Enum QuoteError
enum QuoteError
Errors from Quoter::quote, Quoter::join, etc. (and their bytes counterparts).
By default, the only error that can be returned is QuoteError::Nul. If you call
allow_nul(true), then no errors can be returned at all. Any error variants added in the
future will not be enabled by default; they will be enabled through corresponding non-default
Quoter options.
...In theory. In the unlikely event that additional classes of inputs are discovered that,
like nul bytes, are fundamentally unsafe to quote even for non-interactive shells, the risk
will be mitigated by adding corresponding QuoteError variants that are enabled by
default.
Variants
-
Nul The input contained a nul byte. In most cases, shells fundamentally cannot handle strings containing nul bytes, no matter how they are quoted. But if you're sure you can handle nul bytes, you can call
allow_nul(true)on theQuoterto let them pass through.
Implementations
impl Clone for QuoteError
fn clone(self: &Self) -> QuoteError
impl Copy for QuoteError
impl Debug for QuoteError
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Display for QuoteError
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for QuoteError
impl Error for QuoteError
impl Freeze for QuoteError
impl Hash for QuoteError
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl Ord for QuoteError
fn cmp(self: &Self, other: &QuoteError) -> Ordering
impl PartialEq for QuoteError
fn eq(self: &Self, other: &QuoteError) -> bool
impl PartialOrd for QuoteError
fn partial_cmp(self: &Self, other: &QuoteError) -> Option<Ordering>
impl RefUnwindSafe for QuoteError
impl Send for QuoteError
impl StructuralPartialEq for QuoteError
impl Sync for QuoteError
impl Unpin for QuoteError
impl UnsafeUnpin for QuoteError
impl UnwindSafe for QuoteError
impl<T> Any for QuoteError
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for QuoteError
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for QuoteError
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for QuoteError
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for QuoteError
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for QuoteError
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for QuoteError
fn to_string(self: &Self) -> String
impl<T, U> Into for QuoteError
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for QuoteError
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for QuoteError
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>