pub struct TextWriterBuilder { /* private fields */ }
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");

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.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.