pub struct AsciiEscape<'a> { /* private fields */ }Implementations§
Source§impl<'a> AsciiEscape<'a>
impl<'a> AsciiEscape<'a>
pub const fn new(source: &'a [u8], layout: EscapeLayout) -> Self
pub const fn with_forced_quote(source: &'a [u8], quote: Quote) -> Self
pub fn with_preferred_quote(source: &'a [u8], quote: Quote) -> Self
pub fn new_repr(source: &'a [u8]) -> Self
pub const fn bytes_repr<'r>(&'a self) -> BytesRepr<'r, 'a>
Source§impl AsciiEscape<'_>
impl AsciiEscape<'_>
pub fn repr_layout(source: &[u8], preferred_quote: Quote) -> EscapeLayout
pub fn named_repr_layout(source: &[u8], name: &str) -> EscapeLayout
Trait Implementations§
Source§impl Escape for AsciiEscape<'_>
impl Escape for AsciiEscape<'_>
fn source_len(&self) -> usize
fn layout(&self) -> &EscapeLayout
Source§unsafe fn write_source(&self, formatter: &mut impl Write) -> Result
unsafe fn write_source(&self, formatter: &mut impl Write) -> Result
Write the body of the string directly to the formatter. Read more
fn write_body_slow(&self, formatter: &mut impl Write) -> Result
fn changed(&self) -> bool
fn write_body(&self, formatter: &mut impl Write) -> Result
Auto Trait Implementations§
impl<'a> Freeze for AsciiEscape<'a>
impl<'a> RefUnwindSafe for AsciiEscape<'a>
impl<'a> Send for AsciiEscape<'a>
impl<'a> Sync for AsciiEscape<'a>
impl<'a> Unpin for AsciiEscape<'a>
impl<'a> UnsafeUnpin for AsciiEscape<'a>
impl<'a> UnwindSafe for AsciiEscape<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more