pub struct CustomizedFormatter { /* private fields */ }Expand description
A formatter which can be tuned with regards to S-expressions representation.
Trait Implementations§
Source§impl Clone for CustomizedFormatter
impl Clone for CustomizedFormatter
Source§fn clone(&self) -> CustomizedFormatter
fn clone(&self) -> CustomizedFormatter
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 CustomizedFormatter
impl Debug for CustomizedFormatter
Source§impl Formatter for CustomizedFormatter
impl Formatter for CustomizedFormatter
Source§fn write_char_escape<W>(
&mut self,
writer: &mut W,
char_escape: CharEscape,
) -> Result<(), Error>
fn write_char_escape<W>( &mut self, writer: &mut W, char_escape: CharEscape, ) -> Result<(), Error>
Writes a character escape code to the specified writer.
Source§fn write_nil<W>(&mut self, writer: &mut W) -> Result<(), Error>
fn write_nil<W>(&mut self, writer: &mut W) -> Result<(), Error>
Writes a representation of the special nil value to the specified writer.
Source§fn write_bool<W>(&mut self, writer: &mut W, value: bool) -> Result<(), Error>
fn write_bool<W>(&mut self, writer: &mut W, value: bool) -> Result<(), Error>
Writes a representation of a boolean value to the specified writer. Read more
Source§fn write_keyword<W>(&mut self, writer: &mut W, name: &str) -> Result<(), Error>
fn write_keyword<W>(&mut self, writer: &mut W, name: &str) -> Result<(), Error>
Writes a keyword to the specified writer.
Source§fn begin_vector<W>(
&mut self,
kind: VectorType,
writer: &mut W,
) -> Result<(), Error>
fn begin_vector<W>( &mut self, kind: VectorType, writer: &mut W, ) -> Result<(), Error>
Called before any vector elements. Will write
#( for generic vectors,
or #u8( for byte vectors, to the specified writer.Source§fn end_vector<W>(&mut self, writer: &mut W) -> Result<(), Error>
fn end_vector<W>(&mut self, writer: &mut W) -> Result<(), Error>
Called after all vector elements have been written. Writes a
) to the
specified writer.Source§fn write_char<W>(&mut self, writer: &mut W, c: char) -> Result<(), Error>
fn write_char<W>(&mut self, writer: &mut W, c: char) -> Result<(), Error>
Writes a charactor to the specified writer. Read more
Source§fn write_bytes<W>(&mut self, writer: &mut W, bytes: &[u8]) -> Result<(), Error>
fn write_bytes<W>(&mut self, writer: &mut W, bytes: &[u8]) -> Result<(), Error>
Writes a byte vector to the specified writer.
Source§fn write_null<W>(&mut self, writer: &mut W) -> Result<(), Error>
fn write_null<W>(&mut self, writer: &mut W) -> Result<(), Error>
Writes a representation of the special nil value to the specified writer.
Source§fn write_number<W>(
&mut self,
writer: &mut W,
value: &Number,
) -> Result<(), Error>
fn write_number<W>( &mut self, writer: &mut W, value: &Number, ) -> Result<(), Error>
Writes an integer value like
-123 to the specified writer.Source§fn begin_string<W>(&mut self, writer: &mut W) -> Result<(), Error>
fn begin_string<W>(&mut self, writer: &mut W) -> Result<(), Error>
Called before each series of
write_string_fragment and
write_char_escape. Writes a " to the specified writer.Source§fn end_string<W>(&mut self, writer: &mut W) -> Result<(), Error>
fn end_string<W>(&mut self, writer: &mut W) -> Result<(), Error>
Called after each series of
write_string_fragment and
write_char_escape. Writes a " to the specified writer.Source§fn write_string_fragment<W>(
&mut self,
writer: &mut W,
fragment: &str,
) -> Result<(), Error>
fn write_string_fragment<W>( &mut self, writer: &mut W, fragment: &str, ) -> Result<(), Error>
Writes a string fragment that doesn’t need any escaping to the specified
writer.
Source§fn write_symbol<W>(&mut self, writer: &mut W, name: &str) -> Result<(), Error>
fn write_symbol<W>(&mut self, writer: &mut W, name: &str) -> Result<(), Error>
Writes a symbol to the specified writer.
Source§fn begin_list<W>(&mut self, writer: &mut W) -> Result<(), Error>
fn begin_list<W>(&mut self, writer: &mut W) -> Result<(), Error>
Called before any list elements. Writes a
( to the specified
writer.Source§fn end_list<W>(&mut self, writer: &mut W) -> Result<(), Error>
fn end_list<W>(&mut self, writer: &mut W) -> Result<(), Error>
Called after all list elements have been written. Writes a
) to the
specified writer.Source§fn begin_seq_element<W>(
&mut self,
writer: &mut W,
first: bool,
) -> Result<(), Error>
fn begin_seq_element<W>( &mut self, writer: &mut W, first: bool, ) -> Result<(), Error>
Called before starting to write a list or vector element. Writes a space
to the specified writer, if needed.
Auto Trait Implementations§
impl Freeze for CustomizedFormatter
impl RefUnwindSafe for CustomizedFormatter
impl Send for CustomizedFormatter
impl Sync for CustomizedFormatter
impl Unpin for CustomizedFormatter
impl UnwindSafe for CustomizedFormatter
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