Struct rustc_serialize::json::PrettyEncoder[][src]

pub struct PrettyEncoder<'a> {
    writer: &'a mut (dyn Write + 'a),
    curr_indent: usize,
    indent: usize,
    is_emitting_map_key: bool,
}
Expand description

Another encoder for JSON, but prints out human-readable JSON instead of compact data

Fields

writer: &'a mut (dyn Write + 'a)curr_indent: usizeindent: usizeis_emitting_map_key: bool

Implementations

Creates a new encoder whose output will be written to the specified writer

Sets the number of spaces to indent for each level. This is safe to set during encoding.

Trait Implementations

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.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 40 bytes