pub enum QuoteStyle {
None,
Single,
Double,
}
Expand description
Indicates how, if at all, the printer should quote the byte string.
A printer’s quoting style is chosen by passing a QuoteStyle
to Printer::new
.
The choice of quoting style affects which characters are escaped.
Variants§
None
Indicates that the printer shouldn’t quote its output.
Single
Indicates that the printer should wrap its output in single quotes, and escape any single quotes within the output.
Double
Indicates that the printer should wrap its output in double quotes, and escape anydouble quotes within the output.
Trait Implementations§
Source§impl Clone for QuoteStyle
impl Clone for QuoteStyle
Source§fn clone(&self) -> QuoteStyle
fn clone(&self) -> QuoteStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for QuoteStyle
impl Debug for QuoteStyle
Source§impl Default for QuoteStyle
Returns Quotes::None
.
impl Default for QuoteStyle
Returns Quotes::None
.
Source§impl Hash for QuoteStyle
impl Hash for QuoteStyle
Source§impl Ord for QuoteStyle
impl Ord for QuoteStyle
Source§fn cmp(&self, other: &QuoteStyle) -> Ordering
fn cmp(&self, other: &QuoteStyle) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for QuoteStyle
impl PartialEq for QuoteStyle
Source§impl PartialOrd for QuoteStyle
impl PartialOrd for QuoteStyle
impl Copy for QuoteStyle
impl Eq for QuoteStyle
impl StructuralPartialEq for QuoteStyle
Auto Trait Implementations§
impl Freeze for QuoteStyle
impl RefUnwindSafe for QuoteStyle
impl Send for QuoteStyle
impl Sync for QuoteStyle
impl Unpin for QuoteStyle
impl UnwindSafe for QuoteStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more