Struct jomini::TextWriterBuilder[][src]

pub struct TextWriterBuilder { /* fields omitted */ }
Expand description

Construct a customized text writer

use jomini::TextWriterBuilder;
let mut out: Vec<u8> = Vec::new();
let mut writer = TextWriterBuilder::new().from_writer(&mut out);
writer.write_unquoted(b"hello")?;
writer.write_unquoted(b"world")?;
assert_eq!(std::str::from_utf8(&out).unwrap(), "hello=world\n");

Implementations

Construct a new TextWriterBuilder with default values

The character to indent line.

The default is a space.

The number of indents per increased depth

The default is 2

Construct a text writer from a builder and a writer.

Construct a text writer from a builder, writer, and visitor.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.