[][src]Struct serde_json::ser::Serializer

pub struct Serializer<W, F = CompactFormatter> { /* fields omitted */ }

A structure for serializing Rust values into JSON.

Methods

impl<W> Serializer<W> where
    W: Write
[src]

Creates a new JSON serializer.

impl<'a, W> Serializer<W, PrettyFormatter<'a>> where
    W: Write
[src]

Creates a new JSON pretty print serializer.

impl<W, F> Serializer<W, F> where
    W: Write,
    F: Formatter
[src]

Creates a new JSON visitor whose output will be written to the writer specified.

Unwrap the Writer from the Serializer.

Trait Implementations

impl<'a, W, F> Serializer for &'a mut Serializer<W, F> where
    W: Write,
    F: Formatter
[src]

The output type produced by this Serializer during successful serialization. Most serializers that produce text or binary output should set Ok = () and serialize into an [io::Write] or buffer contained within the Serializer instance. Serializers that build in-memory data structures may be simplified by using Ok to propagate the data structure around. Read more

The error type when some error occurs during serialization.

Type returned from [serialize_seq] for serializing the content of the sequence. Read more

Type returned from [serialize_tuple] for serializing the content of the tuple. Read more

Type returned from [serialize_tuple_struct] for serializing the content of the tuple struct. Read more

Type returned from [serialize_tuple_variant] for serializing the content of the tuple variant. Read more

Type returned from [serialize_map] for serializing the content of the map. Read more

Type returned from [serialize_struct] for serializing the content of the struct. Read more

Type returned from [serialize_struct_variant] for serializing the content of the struct variant. Read more

Serialize newtypes without an object wrapper.

Collect an iterator as a sequence. Read more

Collect an iterator as a map. Read more

Determine whether Serialize implementations should serialize in human-readable form. Read more

Auto Trait Implementations

impl<W, F> Send for Serializer<W, F> where
    F: Send,
    W: Send

impl<W, F> Sync for Serializer<W, F> where
    F: Sync,
    W: Sync

Blanket Implementations

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

impl<T> From for T
[src]

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.

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

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

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.

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