Struct Serializer
struct Serializer<W, F = CompactFormatter> { ... }
A structure for serializing Rust values into JSON.
Implementations
impl<'a, W> Serializer<W, PrettyFormatter<'a>>
fn pretty(writer: W) -> SelfCreates a new JSON pretty print serializer.
impl<W> Serializer<W>
fn new(writer: W) -> SelfCreates a new JSON serializer.
impl<W, F> Serializer<W, F>
fn with_formatter(writer: W, formatter: F) -> SelfCreates a new JSON visitor whose output will be written to the writer specified.
fn into_inner(self: Self) -> WUnwrap the
Writerfrom theSerializer.
impl<T> Any for Serializer<W, F>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Serializer<W, F>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Serializer<W, F>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Serializer<W, F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for Serializer<W, F>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Serializer<W, F>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Serializer<W, F>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>