[][src]Module lexpr::print

Converting S-expression values into text.

Terminology

The process of serializing S-expressions to their textual representation is referred to "writing" in Lisp. To avoid confusion with Rust's Write trait, lexpr uses "printing" instead.

Structs

CustomizedFormatter

A formatter which can be tuned with regards to S-expressions representation.

DefaultFormatter

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

Options

Options for printing S-expressions.

Printer

A printer for S-expression values.

Enums

BoolStyle

How to print boolean values.

CharEscape

Represents a character escape code in a type-safe manner.

KeywordStyle

Indicates a style of keywords.

NilStyle

How to print the special nil value.

Traits

Formatter

This trait abstracts away serializing the S-expression pieces, which allows the implementer to optionally pretty print the S-expression output, as well as to allow customizing the printing for various S-expression "dialects".

Functions

to_string

Serialize the given value an S-expression string, using the default printer options.

to_string_custom

Serialize the given value an S-expression string.

to_vec

Serialize the given value as byte vector containing S-expression text, using the default printer options.

to_vec_custom

Serialize the given value as byte vector containing S-expression text.

to_writer

Serialize the given value value as S-expression text into the IO stream, using the default printer options.

to_writer_custom

Serialize the given value value as S-expression text into the IO stream.