Struct bincode::serde::Serializer [] [src]

pub struct Serializer<'a, W: 'a> {
    // some fields omitted
}

An Serializer that encodes values directly into a Writer.

This struct should not be used often. For most cases, prefer the encode_into function.

Methods

impl<'a, W: Write> Serializer<'a, W>

fn new(w: &'a mut W) -> Serializer<'a, W>

Trait Implementations

impl<'a, W: Write> Serializer for Serializer<'a, W>

type Error = SerializeError

fn serialize_unit(&mut self) -> SerializeResult<()>

fn serialize_bool(&mut self, v: bool) -> SerializeResult<()>

fn serialize_u8(&mut self, v: u8) -> SerializeResult<()>

fn serialize_u16(&mut self, v: u16) -> SerializeResult<()>

fn serialize_u32(&mut self, v: u32) -> SerializeResult<()>

fn serialize_u64(&mut self, v: u64) -> SerializeResult<()>

fn serialize_i8(&mut self, v: i8) -> SerializeResult<()>

fn serialize_i16(&mut self, v: i16) -> SerializeResult<()>

fn serialize_i32(&mut self, v: i32) -> SerializeResult<()>

fn serialize_i64(&mut self, v: i64) -> SerializeResult<()>

fn serialize_f32(&mut self, v: f32) -> SerializeResult<()>

fn serialize_f64(&mut self, v: f64) -> SerializeResult<()>

fn serialize_str(&mut self, v: &str) -> SerializeResult<()>

fn serialize_none(&mut self) -> SerializeResult<()>

fn serialize_some<T>(&mut self, v: T) -> SerializeResult<()> where T: Serialize

fn serialize_seq<V>(&mut self, visitor: V) -> SerializeResult<()> where V: SeqVisitor

fn serialize_tuple<V>(&mut self, visitor: V) -> SerializeResult<()> where V: SeqVisitor

fn serialize_seq_elt<V>(&mut self, value: V) -> SerializeResult<()> where V: Serialize

fn serialize_map<V>(&mut self, visitor: V) -> SerializeResult<()> where V: MapVisitor

fn serialize_map_elt<K, V>(&mut self, key: K, value: V) -> SerializeResult<()> where K: Serialize, V: Serialize

fn serialize_struct<V>(&mut self, _name: &str, visitor: V) -> SerializeResult<()> where V: MapVisitor

fn serialize_struct_elt<V>(&mut self, _key: &str, value: V) -> SerializeResult<()> where V: Serialize

fn serialize_newtype_struct<T>(&mut self, _name: &str, value: T) -> SerializeResult<()> where T: Serialize

fn serialize_unit_variant(&mut self, _name: &str, variant_index: usize, _variant: &str) -> SerializeResult<()>

fn serialize_tuple_variant<V>(&mut self, _name: &str, variant_index: usize, _variant: &str, visitor: V) -> SerializeResult<()> where V: SeqVisitor

fn serialize_struct_variant<V>(&mut self, _name: &str, variant_index: usize, _variant: &str, visitor: V) -> SerializeResult<()> where V: MapVisitor

fn serialize_isize(&mut self, v: isize) -> Result<(), Self::Error>

fn serialize_usize(&mut self, v: usize) -> Result<(), Self::Error>

fn serialize_char(&mut self, v: char) -> Result<(), Self::Error>

fn serialize_bytes(&mut self, value: &[u8]) -> Result<(), Self::Error>

fn serialize_unit_struct(&mut self, _name: &'static str) -> Result<(), Self::Error>

fn serialize_newtype_variant<T>(&mut self, name: &'static str, variant_index: usize, variant: &'static str, value: T) -> Result<(), Self::Error> where T: Serialize

fn serialize_tuple_elt<T>(&mut self, value: T) -> Result<(), Self::Error> where T: Serialize

fn serialize_fixed_size_array<V>(&mut self, visitor: V) -> Result<(), Self::Error> where V: SeqVisitor

fn serialize_tuple_struct<V>(&mut self, _name: &'static str, visitor: V) -> Result<(), Self::Error> where V: SeqVisitor

fn serialize_tuple_struct_elt<T>(&mut self, value: T) -> Result<(), Self::Error> where T: Serialize

fn serialize_tuple_variant_elt<T>(&mut self, value: T) -> Result<(), Self::Error> where T: Serialize

fn serialize_struct_variant_elt<V>(&mut self, key: &'static str, value: V) -> Result<(), Self::Error> where V: Serialize