Struct serde_bare::Serializer[][src]

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

Implementations

impl<W> Serializer<W>[src]

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

Trait Implementations

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

type Ok = ()

Must match the Ok type of our Serializer.

type Error = Error

Must match the Error type of our Serializer.

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

type Ok = ()

Must match the Ok type of our Serializer.

type Error = Error

Must match the Error type of our Serializer.

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

type Ok = ()

Must match the Ok type of our Serializer.

type Error = Error

Must match the Error type of our Serializer.

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

type Ok = ()

Must match the Ok type of our Serializer.

type Error = Error

Must match the Error type of our Serializer.

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

type Ok = ()

Must match the Ok type of our Serializer.

type Error = Error

Must match the Error type of our Serializer.

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

type Ok = ()

Must match the Ok type of our Serializer.

type Error = Error

Must match the Error type of our Serializer.

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

type Ok = ()

Must match the Ok type of our Serializer.

type Error = Error

Must match the Error type of our Serializer.

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

type Ok = ()

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

type Error = Error

The error type when some error occurs during serialization.

type SerializeSeq = Self

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

type SerializeTuple = Self

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

type SerializeTupleStruct = Self

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

type SerializeTupleVariant = Self

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

type SerializeMap = Self

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

type SerializeStruct = Self

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

type SerializeStructVariant = Self

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

fn serialize_bool(self, v: bool) -> Result<Self::Ok, Self::Error>[src]

BARE type: bool

fn serialize_i8(self, v: i8) -> Result<Self::Ok, Self::Error>[src]

BARE type: i8

fn serialize_i16(self, v: i16) -> Result<Self::Ok, Self::Error>[src]

BARE type: i16

fn serialize_i32(self, v: i32) -> Result<Self::Ok, Self::Error>[src]

BARE type: i32

fn serialize_i64(self, v: i64) -> Result<Self::Ok, Self::Error>[src]

BARE type: i64

fn serialize_i128(self, v: i128) -> Result<Self::Ok, Self::Error>[src]

BARE type: data<16>

fn serialize_u8(self, v: u8) -> Result<Self::Ok, Self::Error>[src]

BARE type: u8

fn serialize_u16(self, v: u16) -> Result<Self::Ok, Self::Error>[src]

BARE type: u16

fn serialize_u32(self, v: u32) -> Result<Self::Ok, Self::Error>[src]

BARE type: u32

fn serialize_u64(self, v: u64) -> Result<Self::Ok, Self::Error>[src]

BARE type: u64

fn serialize_u128(self, v: u128) -> Result<Self::Ok, Self::Error>[src]

BARE type: data<16>

fn serialize_f32(self, v: f32) -> Result<Self::Ok, Self::Error>[src]

BARE type: f32

fn serialize_f64(self, v: f64) -> Result<Self::Ok, Self::Error>[src]

BARE type: f64

fn serialize_char(self, v: char) -> Result<Self::Ok, Self::Error>[src]

BARE type: u32

fn serialize_str(self, v: &str) -> Result<Self::Ok, Self::Error>[src]

BARE type: string

fn serialize_bytes(self, v: &[u8]) -> Result<Self::Ok, Self::Error>[src]

BARE type: data

fn serialize_none(self) -> Result<Self::Ok, Self::Error>[src]

BARE type: optional<type>

fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error> where
    T: Serialize
[src]

BARE type: optional<type>

fn serialize_unit(self) -> Result<Self::Ok, Self::Error>[src]

BARE type: void

fn serialize_unit_struct(
    self,
    _name: &'static str
) -> Result<Self::Ok, Self::Error>
[src]

BARE type: void

fn serialize_unit_variant(
    self,
    _name: &'static str,
    variant_index: u32,
    _variant: &'static str
) -> Result<Self::Ok, Self::Error>
[src]

BARE type: uint or (… | void | …) name and variant are ignored.

fn serialize_newtype_struct<T: ?Sized>(
    self,
    _name: &'static str,
    value: &T
) -> Result<Self::Ok, Self::Error> where
    T: Serialize
[src]

BARE type: T name is ignored.

fn serialize_newtype_variant<T: ?Sized>(
    self,
    _name: &'static str,
    variant_index: u32,
    _variant: &'static str,
    value: &T
) -> Result<Self::Ok, Self::Error> where
    T: Serialize
[src]

BARE type: { uint, T } or (… | T | …) name and variant are ignored.

fn serialize_seq(
    self,
    len: Option<usize>
) -> Result<Self::SerializeSeq, Self::Error>
[src]

BARE type if len is Some: []type BARE type [len]type is never used for variable-length sequences Error::SequenceLengthRequired if len is None

fn serialize_tuple(
    self,
    _len: usize
) -> Result<Self::SerializeTuple, Self::Error>
[src]

BARE type: [len]type len is ignored.

fn serialize_tuple_struct(
    self,
    _name: &'static str,
    _len: usize
) -> Result<Self::SerializeTupleStruct, Self::Error>
[src]

BARE type: struct name and len are ignored.

fn serialize_tuple_variant(
    self,
    _name: &'static str,
    variant_index: u32,
    _variant: &'static str,
    _len: usize
) -> Result<Self::SerializeTupleVariant, Self::Error>
[src]

BARE type: { uint, T } or (… | T | …) name, variant, and len are ignored.

fn serialize_map(
    self,
    len: Option<usize>
) -> Result<Self::SerializeMap, Self::Error>
[src]

BARE type: map[T]U Error::MapLengthRequired if len is None

fn serialize_struct(
    self,
    _name: &'static str,
    _len: usize
) -> Result<Self::SerializeStruct, Self::Error>
[src]

BARE type: struct

fn serialize_struct_variant(
    self,
    _name: &'static str,
    variant_index: u32,
    _variant: &'static str,
    _len: usize
) -> Result<Self::SerializeStructVariant, Self::Error>
[src]

BARE type: { uint, T } or (… | T | …)

fn is_human_readable(&self) -> bool[src]

Returns false.

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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

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

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.