#[non_exhaustive]pub enum QuoteError {
Nul,
}Expand description
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 (Non-exhaustive)§
This enum is marked as non-exhaustive
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 the Quoter to let
them pass through.
Trait Implementations§
Source§impl Clone for QuoteError
impl Clone for QuoteError
Source§fn clone(&self) -> QuoteError
fn clone(&self) -> QuoteError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QuoteError
impl Debug for QuoteError
Source§impl Display for QuoteError
impl Display for QuoteError
Source§impl Error for QuoteError
Available on crate feature std only.
impl Error for QuoteError
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl Hash for QuoteError
impl Hash for QuoteError
Source§impl Ord for QuoteError
impl Ord for QuoteError
Source§fn cmp(&self, other: &QuoteError) -> Ordering
fn cmp(&self, other: &QuoteError) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for QuoteError
impl PartialEq for QuoteError
Source§fn eq(&self, other: &QuoteError) -> bool
fn eq(&self, other: &QuoteError) -> bool
self and other values to be equal, and is used by ==.