Struct rustpython_literal::escape::AsciiEscape
source · pub struct AsciiEscape<'a> { /* private fields */ }
Implementations§
source§impl<'a> AsciiEscape<'a>
impl<'a> AsciiEscape<'a>
pub fn new(source: &'a [u8], layout: EscapeLayout) -> Self
pub 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 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<'a> Escape for AsciiEscape<'a>
impl<'a> Escape for AsciiEscape<'a>
fn source_len(&self) -> usize
fn layout(&self) -> &EscapeLayout
fn write_source(&self, formatter: &mut impl Write) -> Result
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> 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