[][src]Struct serde_hjson::ser::Serializer

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

A structure for serializing Rust values into Hjson.

Methods

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

pub fn new(writer: W) -> Self[src]

Creates a new Hjson serializer.

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

pub fn with_formatter(writer: W, formatter: F) -> Self[src]

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

pub fn into_inner(self) -> W[src]

Unwrap the Writer from the Serializer.

Trait Implementations

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

type Error = Error

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

type SeqState = State

A state object that is initialized by serialize_seq, passed to serialize_seq_elt, and consumed by serialize_seq_end. Use () if no state is required. Read more

type TupleState = State

A state object that is initialized by serialize_tuple, passed to serialize_tuple_elt, and consumed by serialize_tuple_end. Use () if no state is required. Read more

type TupleStructState = State

A state object that is initialized by serialize_tuple_struct, passed to serialize_tuple_struct_elt, and consumed by serialize_tuple_struct_end. Use () if no state is required. Read more

type TupleVariantState = State

A state object that is initialized by serialize_tuple_variant, passed to serialize_tuple_variant_elt, and consumed by serialize_tuple_variant_end. Use () if no state is required. Read more

type MapState = State

A state object that is initialized by serialize_map, passed to serialize_map_elt, and consumed by serialize_map_end. Use () if no state is required. Read more

type StructState = State

A state object that is initialized by serialize_struct, passed to serialize_struct_elt, and consumed by serialize_struct_end. Use () if no state is required. Read more

type StructVariantState = State

A state object that is initialized by serialize_struct_variant, passed to serialize_struct_variant_elt, and consumed by serialize_struct_variant_end. Use () if no state is required. Read more

fn serialize_newtype_struct<T>(
    &mut self,
    _name: &'static str,
    value: T
) -> Result<()> where
    T: Serialize
[src]

Serialize newtypes without an object wrapper.

Auto Trait Implementations

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

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

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

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

Blanket Implementations

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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

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

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