pub trait Escape {
// Required methods
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;
// Provided methods
fn changed(&self) -> bool { ... }
fn write_body(&self, formatter: &mut impl Write) -> Result { ... }
}
Required Methods§
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
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.