Module preserves_schema::syntax::block
source · Expand description
A library for emitting pretty-formatted structured source code.
The main entry points are Formatter::to_string and Formatter::write, plus the utilities in the macros submodule.
Modules§
- Ergonomic syntax for using the constructors in submodule constructors; see the documentation for the macros, which appears on the page for the crate itself.
Structs§
- State needed for pretty-formatting of Emittables.
- A sequence of items, indented when formatted vertically, surrounded by opening and closing text.
- A possibly-vertical sequence of items with item-separating and -terminating text.
Enums§
- Tailoring of behaviour for Vertical groupings.
Constants§
- Default width for pretty-formatting, in columns.
Traits§
- All pretty-formattable items must implement this trait.
- Vertical formatting for Emittables.
Functions§
- Escapes
bs
into a Rust byte string literal, treating each byte as its ASCII equivalent except producing\\
for 0x5c,\"
for 0x22, and\x..
for bytes outside the range 0x20..0x7e, inclusive. - Escapes
s
by substituting\\
for\
,\"
for"
, and\u{...}
for characters outside the range 32..126, inclusive.
Type Aliases§
- Polymorphic Emittable, used consistently in the API.