serde 0.6.0

A generic serialization/deserialization framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
b0VIM 7.4���U�����ericktErick-Tryzelaar-MBP.local~erickt/projects/rust/serde/serde/serde/src/ser/mod.rs
3210#"! Utpg��������khQ�ad*�g����zyc��������S�
�
v
1



	
��u6��x7�
�
y
8



�	�	�	�	4		�����,�����/	�����0
�����eW���?���F,�{9��    /// `visit_str` serializes a `&str`.    }        self.visit_str(&v.to_string())        // doesn't support encoding a `char` into a stack buffer.        // FIXME: this allocation is required in order to be compatible with stable rust, which    fn visit_char(&mut self, v: char) -> Result<(), Self::Error> {    #[inline]    /// single character.    /// `visit_char` serializes a character. By default it serializes it as a `&str` containing a    fn visit_f64(&mut self, v: f64) -> Result<(), Self::Error>;    /// `visit_f64` serializes a `f64` value.    }        self.visit_f64(v as f64)    fn visit_f32(&mut self, v: f32) -> Result<(), Self::Error> {    #[inline]    /// it to the `visit_f64` method.    /// `visit_f32` serializes a `f32` value. By default it casts the value to a `f64` and passes    fn visit_u64(&mut self, v: u64) -> Result<(), Self::Error>;    #[inline]    /// `visit_u64` serializes a `u64` value.    }        self.visit_u64(v as u64)    fn visit_u32(&mut self, v: u32) -> Result<(), Self::Error> {    #[inline]    /// it to the `visit_u64` method.    /// `visit_u32` serializes a `u32` value. By default it casts the value to a `u64` and passes    }        self.visit_u64(v as u64)    fn visit_u16(&mut self, v: u16) -> Result<(), Self::Error> {    #[inline]    /// it to the `visit_u64` method.    /// `visit_u32` serializes a `u32` value. By default it casts the value to a `u64` and passes    }        self.visit_u64(v as u64)    fn visit_u8(&mut self, v: u8) -> Result<(), Self::Error> {    #[inline]    /// it to the `visit_u64` method.    /// `visit_u8` serializes a `u8` value. By default it casts the value to a `u64` and passes    }        self.visit_u64(v as u64)    fn visit_usize(&mut self, v: usize) -> Result<(), Self::Error> {    #[inline]    /// passes it to the `visit_u64` method.    /// `visit_usize` serializes a `usize` value. By default it casts the value to a `u64` and    fn visit_i64(&mut self, v: i64) -> Result<(), Self::Error>;    #[inline]    /// `visit_i64` serializes a `i64` value.    }        self.visit_i64(v as i64)    fn visit_i32(&mut self, v: i32) -> Result<(), Self::Error> {    #[inline]    /// passes it to the `visit_i64` method.    /// `visit_i32` serializes a `i32` value. By default it casts the value to a `i64` and    }        self.visit_i64(v as i64)    fn visit_i16(&mut self, v: i16) -> Result<(), Self::Error> {    #[inline]    /// passes it to the `visit_i64` method.    /// `visit_i16` serializes a `i16` value. By default it casts the value to a `i64` and    }        self.visit_i64(v as i64)    fn visit_i8(&mut self, v: i8) -> Result<(), Self::Error> {    #[inline]    /// passes it to the `visit_i64` method.    /// `visit_i8` serializes a `i8` value. By default it casts the value to a `i64` and    }        self.visit_i64(v as i64)    fn visit_isize(&mut self, v: isize) -> Result<(), Self::Error> {    #[inline]    /// passes it to the `visit_i64` method.    /// `visit_isize` serializes a `isize` value. By default it casts the value to a `i64` and    fn visit_bool(&mut self, v: bool) -> Result<(), Self::Error>;    /// `visit_bool` serializes a `bool` value.    type Error;pub trait Serializer {///////////////////////////////////////////////////////////////////////////////}        where S: Serializer;    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>pub trait Serialize {///////////////////////////////////////////////////////////////////////////////pub mod impls;//! Generic serialization framework.ad� Q���b\[����lk];�
�
�
�
�
�
y
S
%
�������])��wZT("!�
�
g
K
E



�	�	�	R	0	%					���dV1$���hZ5(" }    }        None    fn len(&self) -> Option<usize> {    #[inline]    /// Return the length of the map if known.        where S: Serializer;    fn visit<S>(&mut self, serializer: &mut S) -> Result<Option<()>, S::Error>pub trait MapVisitor {}    }        None    fn len(&self) -> Option<usize> {    #[inline]    /// Return the length of the sequence if known.        where S: Serializer;    fn visit<S>(&mut self, serializer: &mut S) -> Result<Option<()>, S::Error>pub trait SeqVisitor {}    }        ""    fn format() -> &'static str {    /// specific field attributes should be used with the serializer.    /// The serializer format is used to determine which format    ///    /// Specify a format string for the serializer.    }        self.visit_struct_elt(key, value)    {        where V: Serialize,                                   value: V) -> Result<(), Self::Error>                                   key: &'static str,    fn visit_struct_variant_elt<V>(&mut self,    #[inline]    }        self.visit_struct(variant, visitor)    {        where V: MapVisitor,                               visitor: V) -> Result<(), Self::Error>                               variant: &'static str,                               _variant_index: usize,                               _name: &'static str,    fn visit_struct_variant<V>(&mut self,    #[inline]    }        self.visit_map_elt(key, value)    {        where V: Serialize,                           value: V) -> Result<(), Self::Error>                           key: &'static str,    fn visit_struct_elt<V>(&mut self,    #[inline]    }        self.visit_map(visitor)    {        where V: MapVisitor,                       visitor: V) -> Result<(), Self::Error>                       _name: &'static str,    fn visit_struct<V>(&mut self,    #[inline]              V: Serialize;        where K: Serialize,    fn visit_map_elt<K, V>(&mut self, key: K, value: V) -> Result<(), Self::Error>        where V: MapVisitor;    fn visit_map<V>(&mut self, visitor: V) -> Result<(), Self::Error>    }        self.visit_tuple_struct_elt(value)    {        where T: Serialize    fn visit_tuple_variant_elt<T>(&mut self, value: T) -> Result<(), Self::Error>