[][src]Struct lexpr::print::DefaultFormatter

pub struct DefaultFormatter;

This structure compacts a S-expression value on a single line, using the default representation, which is similar to Scheme.

Trait Implementations

impl Formatter for DefaultFormatter[src]

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

Writes a representation of the special nil value to the specified writer.

fn write_bool<W: ?Sized>(&mut self, writer: &mut W, value: bool) -> Result<()> where
    W: Write
[src]

Writes a representation of a boolean value to the specified writer. Read more

fn write_number<W: ?Sized>(
    &mut self,
    writer: &mut W,
    value: &Number
) -> Result<()> where
    W: Write
[src]

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

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

Called before each series of write_string_fragment and write_char_escape. Writes a " to the specified writer. Read more

fn end_string<W: ?Sized>(&mut self, writer: &mut W) -> Result<()> where
    W: Write
[src]

Called after each series of write_string_fragment and write_char_escape. Writes a " to the specified writer. Read more

fn write_string_fragment<W: ?Sized>(
    &mut self,
    writer: &mut W,
    fragment: &str
) -> Result<()> where
    W: Write
[src]

Writes a string fragment that doesn't need any escaping to the specified writer. Read more

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

Writes a character escape code to the specified writer.

fn write_symbol<W: ?Sized>(&mut self, writer: &mut W, name: &str) -> Result<()> where
    W: Write
[src]

Writes a symbol to the specified writer.

fn write_keyword<W: ?Sized>(&mut self, writer: &mut W, name: &str) -> Result<()> where
    W: Write
[src]

Writes a keyword to the specified writer.

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

Called before any list elements. Writes a ( to the specified writer. Read more

fn begin_list_element<W: ?Sized>(
    &mut self,
    writer: &mut W,
    first: bool
) -> Result<()> where
    W: Write
[src]

Called before starting to write a list element. Writes a space if needed to the specified writer. Read more

fn end_list_element<W: ?Sized>(&mut self, _writer: &mut W) -> Result<()> where
    W: Write
[src]

Called after every list element.

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

Called after all list elements have been written. Writes a ) to the specified writer. Read more

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

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. Read more

impl Clone for DefaultFormatter[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for DefaultFormatter[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.