Struct serde_json::value::Serializer [] [src]

pub struct Serializer { /* fields omitted */ }

Create a serde::Serializer that serializes a Serializee into a Value.

Methods

impl Serializer
[src]

Construct a new Serializer.

Unwrap the Serializer and return the Value.

Trait Implementations

impl Serializer for Serializer
[src]

The error type that can be returned if some error occurs during serialization.

visit_bool serializes a bool value.

visit_i64 serializes a i64 value.

visit_u64 serializes a u64 value.

visit_f64 serializes a f64 value.

visit_char serializes a character. By default it serializes it as a &str containing a single character. Read more

visit_str serializes a &str.

Serializes a None value.

Serializes a Some(...) value.

Serializes a () value.

Serializes a unit variant, otherwise known as a variant with no arguments. Read more

The visit_newtype_variant allows a variant with a single item to be more efficiently serialized than a variant with multiple items. By default it just serializes the value as a tuple variant sequence. Read more

Serializes a sequence. Read more

Serializes a tuple variant. Read more

Serializes a sequence element.

Serializes a map. Read more

Serializes a struct variant. Read more

Serializes a map element (key-value pair).

Specify a format string for the serializer. Read more

visit_isize serializes a isize value. By default it casts the value to a i64 and passes it to the visit_i64 method. Read more

visit_i8 serializes a i8 value. By default it casts the value to a i64 and passes it to the visit_i64 method. Read more

visit_i16 serializes a i16 value. By default it casts the value to a i64 and passes it to the visit_i64 method. Read more

visit_i32 serializes a i32 value. By default it casts the value to a i64 and passes it to the visit_i64 method. Read more

visit_usize serializes a usize value. By default it casts the value to a u64 and passes it to the visit_u64 method. Read more

visit_u8 serializes a u8 value. By default it casts the value to a u64 and passes it to the visit_u64 method. Read more

visit_u32 serializes a u32 value. By default it casts the value to a u64 and passes it to the visit_u64 method. Read more

visit_u32 serializes a u32 value. By default it casts the value to a u64 and passes it to the visit_u64 method. Read more

visit_f32 serializes a f32 value. By default it casts the value to a f64 and passes it to the visit_f64 method. Read more

visit_bytes is a hook that enables those serialization formats that support serializing byte slices separately from generic arrays. By default it serializes as a regular array. Read more

Serializes a unit struct value. Read more

The visit_newtype_struct allows a tuple struct with a single element, also known as a newtyped value, to be more efficiently serialized than a tuple struct with multiple items. By default it just serializes the value as a tuple struct sequence. Read more

Serializes a tuple. Read more

Serializes a tuple element. Read more

Serializes a tuple struct. Read more

Serializes a tuple struct element. Read more

Serializes a tuple element. Read more

Serializes a struct. Read more

Serializes an element of a struct. Read more

Serializes an element of a struct variant. Read more