[][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

BoolSyntax

How to print boolean values.

BytesSyntax

How to print byte vectors.

CharEscape

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

CharSyntax

Indicates the syntax for characters.

KeywordSyntax

Indicates a syntax of keywords.

NilSyntax

How to print the special nil value.

StringSyntax

Indicates the syntax for strings.

VectorSyntax

How to print vectors.

VectorType

Different vector types

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.