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

source§

fn clone(&self) -> CustomizedFormatter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CustomizedFormatter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Formatter for CustomizedFormatter

source§

fn write_char_escape<W>( &mut self, writer: &mut W, char_escape: CharEscape ) -> Result<()>where W: Write + ?Sized,

Writes a character escape code to the specified writer.

source§

fn write_nil<W>(&mut self, writer: &mut W) -> Result<()>where W: Write + ?Sized,

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<()>where W: Write + ?Sized,

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<()>where W: Write + ?Sized,

Writes a keyword to the specified writer.
source§

fn begin_vector<W>(&mut self, kind: VectorType, writer: &mut W) -> Result<()>where W: Write + ?Sized,

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<()>where W: Write + ?Sized,

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<()>where W: Write + ?Sized,

Writes a charactor to the specified writer. Read more
source§

fn write_bytes<W>(&mut self, writer: &mut W, bytes: &[u8]) -> Result<()>where W: Write + ?Sized,

Writes a byte vector to the specified writer.
source§

fn write_null<W>(&mut self, writer: &mut W) -> Result<()>where W: Write + ?Sized,

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<()>where W: Write + ?Sized,

Writes an integer value like -123 to the specified writer.
source§

fn begin_string<W>(&mut self, writer: &mut W) -> Result<()>where W: Write + ?Sized,

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<()>where W: Write + ?Sized,

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<()>where W: Write + ?Sized,

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<()>where W: Write + ?Sized,

Writes a symbol to the specified writer.
source§

fn begin_list<W>(&mut self, writer: &mut W) -> Result<()>where W: Write + ?Sized,

Called before any list elements. Writes a ( to the specified writer.
source§

fn end_list<W>(&mut self, writer: &mut W) -> Result<()>where W: Write + ?Sized,

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<()>where W: Write + ?Sized,

Called before starting to write a list or vector element. Writes a space to the specified writer, if needed.
source§

fn end_seq_element<W>(&mut self, _writer: &mut W) -> Result<()>where W: Write + ?Sized,

Called after every list or vector element.
source§

fn write_dot<W>(&mut self, writer: &mut W) -> Result<()>where W: Write + ?Sized,

Called before writing the tail of an improper list, or more generally, the cdr field of a cons cell. Writes a . to the specified writer.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.