Enum QuoteError
#[non_exhaustive]
pub 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.
Trait Implementations
impl Clone for QuoteError
fn clone(&self) -> QuoteError
impl Copy for QuoteError
impl Debug for QuoteError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for QuoteError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for QuoteError
impl Error for QuoteError
impl Hash for QuoteError
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Ord for QuoteError
fn cmp(&self, other: &QuoteError) -> Ordering
impl PartialEq for QuoteError
fn eq(&self, other: &QuoteError) -> bool
impl PartialOrd for QuoteError
fn partial_cmp(&self, other: &QuoteError) -> Option<Ordering>
impl StructuralPartialEq for QuoteError
Auto Trait Implementations
impl Freeze for QuoteError
impl RefUnwindSafe for QuoteError
impl Send for QuoteError
impl Sync for QuoteError
impl Unpin for QuoteError
impl UnsafeUnpin for QuoteError
impl UnwindSafe for QuoteError
Blanket Implementations
impl<T> Any for QuoteError
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for QuoteError
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for QuoteError
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for QuoteError
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for QuoteError
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for QuoteError
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for QuoteError
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for QuoteError
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for QuoteError
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for QuoteError
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>