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

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

A structure for implementing serialization to JSON.

Methods

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

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

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

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.

Emit a nil value. Read more

Emit a usize value.

Emit a u64 value.

Emit a u32 value.

Emit a u16 value.

Emit a u8 value.

Emit a isize value.

Emit a i64 value.

Emit a i32 value.

Emit a i16 value.

Emit a i8 value.

Emit a bool value. Read more

Emit a f64 value.

Emit a f32 value.

Emit a char value. Read more

Emit a string value.

Emit an enumeration value. Read more

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

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

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

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

Emit a struct value. Read more

Emit a field item for a struct. Read more

Emit a tuple value. Read more

Emit a data item for a tuple. Read more

Emit a tuple struct value. Read more

Emit a data item for a tuple struct. Read more

Emit an optional value. Read more

Emit the None optional value. Read more

Emit the Some(x) optional value. Read more

Emit a sequence of values. Read more

Emit an element in a sequence. Read more

Emit an associative container (map). Read more

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

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

Auto Trait Implementations

impl<'a> !Send for Encoder<'a>

impl<'a> !Sync for Encoder<'a>

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more