Struct rustc_serialize::json::Encoder [] [src]

pub struct Encoder<'a> { /* fields omitted */ }

A structure for implementing serialization to JSON.

Methods

impl<'a> Encoder<'a>
[src]

[src]

Creates a new encoder whose output will be written in human-readable JSON to the specified writer

[src]

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

[src]

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

Trait Implementations

impl<'a> Encoder for Encoder<'a>
[src]

The error type for method results.

[src]

Emit a nil value. Read more

[src]

Emit a usize value.

[src]

Emit a u64 value.

[src]

Emit a u32 value.

[src]

Emit a u16 value.

[src]

Emit a u8 value.

[src]

Emit a isize value.

[src]

Emit a i64 value.

[src]

Emit a i32 value.

[src]

Emit a i16 value.

[src]

Emit a i8 value.

[src]

Emit a bool value. Read more

[src]

Emit a f64 value.

[src]

Emit a f32 value.

[src]

Emit a char value. Read more

[src]

Emit a string value.

[src]

Emit an enumeration value. Read more

[src]

Emit a enumeration variant value with no or unnamed data. Read more

[src]

Emit an unnamed data item for an enumeration variant. Read more

[src]

Emit a enumeration variant value with no or named data. Read more

[src]

Emit a named data item for an enumeration variant. Read more

[src]

Emit a struct value. Read more

[src]

Emit a field item for a struct. Read more

[src]

Emit a tuple value. Read more

[src]

Emit a data item for a tuple. Read more

[src]

Emit a tuple struct value. Read more

[src]

Emit a data item for a tuple struct. Read more

[src]

Emit an optional value. Read more

[src]

Emit the None optional value. Read more

[src]

Emit the Some(x) optional value. Read more

[src]

Emit a sequence of values. Read more

[src]

Emit an element in a sequence. Read more

[src]

Emit an associative container (map). Read more

[src]

Emit the key for an entry in a map. Read more

[src]

Emit the value for an entry in a map. Read more