serde 0.6.0

A generic serialization/deserialization framework
Documentation
b0VIM 7.4<R�U;[��JericktErick-Tryzelaar-MBP.local~erickt/projects/rust/serde/serde/serde/src/de/mod.rsutf-8
3210#"! UtpX@X^tt_�G
qd�m�	>*p_ad�X�����ih����"�
�
�
�
�
U
-
'
&
���_43����\@0�
�
�
�
�
�
�
�
�
_
V
U
4
+
*

�	�	�	�	�	�	�	�	�	}	|	[	R	Q	0	'	&		��������~rqQGF!�����������87���Z;98���$ �j0,�g
��o         /// The error type that can be returned if some error occurs during deserialization.pub trait Deserializer {///    `json::Value`-esque type.///    supporting the `visit_*` types is that it does not allow for deserializing into a generic///    the `visit_*` methods how it should parse the next value. One downside though to only///    it's values. It relies instead on the `Deserialize` type to hint to the `Deserializer` with/// 2) The `visit_*` methods. File formats like bincode do not embed in it's format how to decode//////    `json::Value`, which can represent all JSON types.///    format. This allows the `Deserializer` to deserialize into a generic type like/// 1) The `visit` method. File formats like JSON embed the type of it's construct in it's file////// value. It supports two entry point styles which enables different kinds of deserialization./// `Deserializer` is a trait that can deserialize values by threading a `Visitor` trait through a///////////////////////////////////////////////////////////////////////////////}        where D: Deserializer;    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>    /// Deserialize this value given this `Deserializer`.pub trait Deserialize: Sized {/// `Deserialize` represents a type that can be deserialized.///////////////////////////////////////////////////////////////////////////////}    Bytes,    UnitVariant,    TupleVariant,    StructVariant,    Enum,    Tuple,    Struct,    TupleStruct,    NewtypeStruct,                 /// Represents an `Option<T>` type.    Unit,    /// Represents a `()` type.    String,    /// Represents a `String` type.    Str,    /// Represents a `&str` type.    Char,    /// Represents a `char` type.    F64,    /// Represents a `f64` type.    F32,    /// Represents a `f32` type.    I64,    /// Represents a `i64` type.    I32,    /// Represents a `i32` type.    I16,    /// Represents a `i16` type.    I8,    /// Represents a `i8` type.    Isize,    /// Represents a `isize` type.    U64,    /// Represents a `u64` type.    U32,    /// Represents a `u32` type.    U16,    /// Represents a `u16` type.    U8,    /// Represents a `u8` type.    Usize,    /// Represents a `usize` type.    Bool,    /// Represents a `bool` type.pub enum Type {/// `Error::kind_mismatch`./// `Type` represents all the primitive types that can be deserialized. This is used by}    fn missing_field(field: &'static str) -> Self;    /// Raised when a `Deserialize` struct type did not receive a field.    fn unknown_field(field: &str) -> Self;    /// Raised when a `Deserialize` struct type received an unexpected struct field.    fn end_of_stream() -> Self;    /// Raised when a `Deserialize` type unexpectedly hit the end of the stream.    }        Error::syntax("incorrect type")    fn type_mismatch(_type: Type) -> Self {    /// Raised when a `Deserialize` was passed an incorrect type.    }        Error::syntax("incorrect length")    fn length_mismatch(_len: usize) -> Self {    /// Raised when a fixed sized sequence or map was passed in the wrong amount of arguments.    fn syntax(msg: &str) -> Self;    /// Raised when there is general error when deserializing a type.pub trait Error: Sized {/// `Deserializer` error./// `Error` is a trait that allows a `Deserialize` to generically create a///////////////////////////////////////////////////////////////////////////////pub mod value;pub mod impls;//! Generic deserialization framework.ad�K
���O54���lfJDC�
�
�
x
r
R
L
K
    }        self.visit_u64(visitor)    {        where V: Visitor,    fn visit_usize<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `usize` value.    }        self.visit(visitor)    {        where V: Visitor,    fn visit_bool<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting a `bool` value.        where V: Visitor;    fn visit<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    /// This method walks a visitor through a value as it is being deserialized.    type Error: Error;ad�_����u��y_Y=76�
�
}
1


����I;������N�
�
�
S
9
3



�	X	J	 	����OIH���i7���}wv���|C������Z���uoOIH��zlL"���                     _visitor: V) -> Result<V::Value, Self::Error>                     _variants: &'static [&'static str],                     _enum: &'static str,    fn visit_enum<V>(&mut self,    #[inline]    /// type.    /// deserializers that provide a custom enumeration serialization to properly deserialize the    /// This method hints that the `Deserialize` type is expecting an enum value. This allows    }        self.visit_seq(visitor)    {        where V: Visitor,    fn visit_tuple<V>(&mut self, _len: usize, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// deserializers that provide a custom tuple serialization to properly deserialize the type.    /// This method hints that the `Deserialize` type is expecting a tuple value. This allows    }        self.visit_map(visitor)    {        where V: Visitor,                       visitor: V) -> Result<V::Value, Self::Error>                       _fields: &'static [&'static str],                       _name: &'static str,    fn visit_struct<V>(&mut self,    #[inline]    /// deserializers to parse sequences that aren't tagged as maps.    /// This method hints that the `Deserialize` type is expecting a struct. This allows    }        self.visit_tuple(len, visitor)    {        where V: Visitor,                             visitor: V) -> Result<V::Value, Self::Error>                             len: usize,                             _name: &'static str,    fn visit_tuple_struct<V>(&mut self,    #[inline]    /// deserializers to parse sequences that aren't tagged as sequences.    /// This method hints that the `Deserialize` type is expecting a tuple struct. This allows    }        self.visit_tuple_struct(name, 1, visitor)    {        where V: Visitor,                               visitor: V) -> Result<V::Value, Self::Error>                               name: &'static str,    fn visit_newtype_struct<V>(&mut self,    #[inline]    /// deserializers to a newtype struct that aren't tagged as a newtype struct.    /// This method hints that the `Deserialize` type is expecting a newtype struct. This allows    }        self.visit_unit(visitor)    {        where V: Visitor,                            visitor: V) -> Result<V::Value, Self::Error>                            _name: &'static str,    fn visit_unit_struct<V>(&mut self,    #[inline]    /// deserializers to a unit struct that aren't tagged as a unit struct.    /// This method hints that the `Deserialize` type is expecting a unit struct. This allows    }        self.visit(visitor)    {        where V: Visitor,    fn visit_map<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// deserializers to parse sequences that aren't tagged as maps.    /// This method hints that the `Deserialize` type is expecting a map of values. This allows    }        self.visit(visitor)    {        where V: Visitor,    fn visit_seq<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// deserializers to parse sequences that aren't tagged as sequences.    /// This method hints that the `Deserialize` type is expecting a sequence value. This allows    }        self.visit(visitor)    {        where V: Visitor,    fn visit_option<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// into a `None`, and a regular value as `Some(value)`.    /// deserializers that encode an optional value as a nullable value to convert the null value    /// This method hints that the `Deserialize` type is expecting an `Option` value. This allows    }        self.visit(visitor)    {ad
������J���~d^>87�
�
}
g
E
:
4
2
1
�����ed ����pjICB�
�
�
�
�
|
d
^
=
7
6
�	�	�	�	�	�	m	U	O	"			������Q93������C+%�����pji(
������UON@���=
���yxj#������]WVH    #[inline]    }        Err(Error::type_mismatch(Type::Unit))    {        where E: Error,    fn visit_unit<E>(&mut self) -> Result<Self::Value, E>    }        self.visit_str(&v)    {        where E: Error,    fn visit_string<E>(&mut self, v: String) -> Result<Self::Value, E>    #[inline]    }        Err(Error::type_mismatch(Type::Str))    {        where E: Error,    fn visit_str<E>(&mut self, _v: &str) -> Result<Self::Value, E>    }        self.visit_string(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    {        where E: Error,    fn visit_char<E>(&mut self, v: char) -> Result<Self::Value, E>    #[inline]    }        Err(Error::type_mismatch(Type::F64))    {        where E: Error,    fn visit_f64<E>(&mut self, _v: f64) -> Result<Self::Value, E>    }        self.visit_f64(v as f64)    {        where E: Error,    fn visit_f32<E>(&mut self, v: f32) -> Result<Self::Value, E>    }        Err(Error::type_mismatch(Type::U64))    {        where E: Error,    fn visit_u64<E>(&mut self, _v: u64) -> Result<Self::Value, E>    }        self.visit_u64(v as u64)    {        where E: Error,    fn visit_u32<E>(&mut self, v: u32) -> Result<Self::Value, E>    }        self.visit_u64(v as u64)    {        where E: Error,    fn visit_u16<E>(&mut self, v: u16) -> Result<Self::Value, E>    }        self.visit_u64(v as u64)    {        where E: Error,    fn visit_u8<E>(&mut self, v: u8) -> Result<Self::Value, E>    }        self.visit_u64(v as u64)    {        where E: Error,    fn visit_usize<E>(&mut self, v: usize) -> Result<Self::Value, E>    }        Err(Error::type_mismatch(Type::I64))    {        where E: Error,    fn visit_i64<E>(&mut self, _v: i64) -> Result<Self::Value, E>    }        self.visit_i64(v as i64)    {        where E: Error,    fn visit_i32<E>(&mut self, v: i32) -> Result<Self::Value, E>    }        self.visit_i64(v as i64)    {        where E: Error,    fn visit_i16<E>(&mut self, v: i16) -> Result<Self::Value, E>    }        self.visit_i64(v as i64)    {        where E: Error,    fn visit_i8<E>(&mut self, v: i8) -> Result<Self::Value, E>    }        self.visit_i64(v as i64)    {        where E: Error,    fn visit_isize<E>(&mut self, v: isize) -> Result<Self::Value, E>    }        Err(Error::type_mismatch(Type::Bool))    {        where E: Error,    fn visit_bool<E>(&mut self, _v: bool) -> Result<Self::Value, E>    type Value: Deserialize;    /// The value produ/// This trait represents a visitor that walks through a deserializer.///////////////////////////////////////////////////////////////////////////////}    }        ""    fn format() -> &'static str {    /// deserializer.    /// specific field attributes should be used with the    /// The deserializer format is used to determine which format    ///    /// Specify a format string for the deserializer.    }        self.visit_seq(visitor)    {        where V: Visitor,    fn visit_bytes<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// type.    /// deserializers that provide a custom byte vector serialization to properly deserialize the    /// This method hints that the `Deserialize` type is expecting a `Vec<u8>`. This allows    }        Err(Error::syntax("expected an enum"))    {        where V: EnumVisitor,ad��m���rlk,������c�
�
�
�
�
k
	
�����e������4�
�
�
�
Z
B
<



�	z	b	\	?	9	7	6	����M0���D���g54�������O43%�������jSML>
������b^��}7�����W93
����U7�������f`_^    }    /// The error type t    /// The error type that can b    /// The error type that can be returned if some error occurs during deserialization.pub trait MapVisitor {/// This is a trait that a `Deserializer` passes to a `Visitor` implementation.////// `MapVisitor` visits each item in a sequence.///////////////////////////////////////////////////////////////////////////////}    }        (**self).size_hint()    fn size_hint(&self) -> (usize, Option<usize>) {    #[inline]    }        (**self).end()    fn end(&mut self) -> Result<(), V::Error> {    #[inline]    }        (**self).visit()    {        where T: Deserialize    fn visit<T>(&mut self) -> Result<Option<T>, V::Error>    #[inline]    type Error = V::Error;impl<'a, V> SeqVisitor for &'a mut V where V: SeqVisitor {}    }        (0, None)    fn size_hint(&self) -> (usize, Option<usize>) {    #[inline]    /// Return the lower and upper bound of items remaining in the sequence.    fn end(&mut self) -> Result<(), Self::Error>;    /// This signals to the `SeqVisitor` that the `Visitor` does not expect any more items.        where T: Deserialize;    fn visit<T>(&mut self) -> Result<Option<T>, Self::Error>    /// are no more remaining items.    /// This returns a `Ok(Some(value))` for the next value in the sequence, or `Ok(None)` if there    type Error: Error;    /// The error type that can be returned if some error occurs during deserialization.pub trait SeqVisitor {/// each item in a sequence./// This is a trait that a `Deserializer` passes to a `Visitor` implementation, which deserializes////// `SeqVisitor` visits each item in a sequence.///////////////////////////////////////////////////////////////////////////////}    }        self.visit_bytes(&v)    {        where E: Error,    fn visit_byte_buf<E>(&mut self, v: Vec<u8>) -> Result<Self::Value, E>    /// `visit_byte_buf` deserializes a `Vec<u8>` into a `Value`.    }        Err(Error::type_mismatch(Type::Bytes))    {        where E: Error,    fn visit_bytes<E>(&mut self, _v: &[u8]) -> Result<Self::Value, E>    /// `visit_bytes` deserializes a `&[u8]` into a `Value`.    }        Err(Error::type_mismatch(Type::Map))    {        where V: MapVisitor,    fn visit_map<V>(&mut self, _visitor: V) -> Result<Self::Value, V::Error>    /// `visit_map` deserializes a `MapVisitor` into a `Value`.    }        Err(Error::type_mismatch(Type::Seq))    {        where V: SeqVisitor,    fn visit_seq<V>(&mut self, _visitor: V) -> Result<Self::Value, V::Error>    /// `visit_bool` deserializes a `SeqVisitor` into a `Value`.    }        Err(Error::type_mismatch(Type::NewtypeStruct))    {        where D: Deserializer,    fn visit_newtype_struct<D>(&mut self, _deserializer: &mut D) -> Result<Self::Value, D::Error>    /// `visit_newtype_struct` deserializes a value into a `Value`.    }        Err(Error::type_mismatch(Type::Option))    {        where D: Deserializer,    fn visit_some<D>(&mut self, _deserializer: &mut D) -> Result<Self::Value, D::Error>    /// `visit_some` deserializes a value into a `Value`.    }        Err(Error::type_mismatch(Type::Option))    {        where E: Error,    fn visit_none<E>(&mut self) -> Result<Self::Value, E>    /// `visit_none` deserializes a none value into a `Value`.    }        self.visit_unit()    {        where E: Error,    fn visit_unit_struct<E>(&mut self, _name: &'static str) -> Result<Self::Value, E>ad�vp����wqpb1�����[Z�
�
�
~
}
?
������(��qZY
�
�
�
e
+
�	�	�	�	K	=		���{ut+
����NHG���\C=�����dGA �����e_>87����icb@���~xv����UTS///////////////////////////////////////////////////////////////////////////////}}        where V: SeqVisitor;  }    }        (**self).visit_struct(fields, visitor)    {        where V: Visitor,                    visitor: V) -> Result<V::Value, T::Error>                    fields: &'static [&'static str],    fn visit_struct<V>(&mut self,    }        (**self).visit_tuple(len, visitor)    {        where V: Visitor,                      visitor: V) -> Result<V::Value, T::Error>                      len: usize,    fn visit_tuple<V>(&mut self,    }        (**self).visit_newtype()    {        where D: Deserialize,    fn visit_newtype<D>(&mut self) -> Result<D, T::Error>    }        (**self).visit_unit()    fn visit_unit(&mut self) -> Result<(), T::Error> {    }        (**self).visit_variant()    {        where V: Deserialize    fn visit_variant<V>(&mut self) -> Result<V, T::Error>    type Error = T::Error;impl<'a, T> VariantVisitor for &'a mut T where T: VariantVisitor {}    }        Err(Error::type_mismatch(Type::StructVariant))    {        where V: Visitor                       _visitor: V) -> Result<V::Value, Self::Error>                       _fields: &'static [&'static str],    fn visit_struct<V>(&mut self,    /// `visit_struct` is called when deserializing a struct-like variant.    }        Err(Error::type_mismatch(Type::TupleVariant))    {        where V: Visitor                      _visitor: V) -> Result<V::Value, Self::Error>                      _len: usize,    fn visit_tuple<V>(&mut self,    /// `visit_tuple` is called when deserializing a tuple-like variant.    }        Ok(value)        let (value,) = try!(self.visit_tuple(1, impls::TupleVisitor1::new()));    {        where T: Deserialize,    fn visit_newtype<T>(&mut self) -> Result<T, Self::Error>    #[inline]    /// uses the `visit_tuple` method to deserialize the value.    /// `visit_newtype` is called when deserializing a variant with a single value. By default this    }        Err(Error::type_mismatch(Type::UnitVariant))    fn visit_unit(&mut self) -> Result<(), Self::Error> {    /// `visit_unit` is called when deserializing a variant with no values.        where V: Deserialize;    fn visit_variant<V>(&mut self) -> Result<V, Self::Error>    /// `visit_variant` is called to identify which variant to deserialize.    type Error: Error;    /// The error type that can be returned if some error occurs during deserialization.pub trait VariantVisitor {/// `Deserialize` in order to deserialize a specific enum variant./// `VariantVisitor` is a visitor that is created by the `Deserializer` and passed to the///////////////////////////////////////////////////////////////////////////////}        where V: VariantVisitor;    fn visit<V>(&mut self, visitor: V) -> Result<Self::Value, V::Error>    /// Visit the specific variant with the `VariantVisitor`.    type Value;    /// The value produced by this visitor.pub trait EnumVisitor {/// `Deserializer` in order to deserialize enums./// `EnumVisitor` is a visitor that is created by the `Deserialize` and passed to the///////////////////////////////////////////////////////////////////////////////}    }        (**self).size_hint()    fn size_hint(&self) -> (usize, Option<usize>) {    #[inline]    }        (**self).end()    fn end(&mut self) -> Result<(), V_::Error> {    #[inline]    }        (**self).visit_value()    {        where V: Deserialize    fn visit_value<V>(&mut self) -> Result<V, V_::Error>    #[inline]ad�t��U;5��aGA!�
�
m
S
M
-
'
&
��y_Y=76���keE?>�
�
�
y
s
S
M
L
�	�	�	�		_	Y	X		����ked���{ut"������/!������?1������N@������\N������dV	�        where V: Visitor,    fn visit_unit<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `unit` value.    }        self.visit_str(visitor)    {        where V: Visitor,    fn visit_string<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting a `String` value.    }        self.visit(visitor)    {        where V: Visitor,    fn visit_str<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting a `&str` value.    }        self.visit(visitor)    {        where V: Visitor,    fn visit_char<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting a `char` value.    }        self.visit(visitor)    {        where V: Visitor,    fn visit_f64<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting a `f64` value.    }        self.visit_f64(visitor)    {        where V: Visitor,    fn visit_f32<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting a `f32` value.    }        self.visit(visitor)    {        where V: Visitor,    fn visit_i64<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `i64` value.    }        self.visit_i64(visitor)    {        where V: Visitor,    fn visit_i32<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `i32` value.    }        self.visit_i64(visitor)    {        where V: Visitor,    fn visit_i16<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `i16` value.    }        self.visit_i64(visitor)    {        where V: Visitor,    fn visit_i8<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `i8` value.    }        self.visit_i64(visitor)    {        where V: Visitor,    fn visit_isize<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `isize` value.    }        self.visit(visitor)    {        where V: Visitor,    fn visit_u64<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `u64` value.    }        self.visit_u64(visitor)    {        where V: Visitor,    fn visit_u32<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `u32` value.    }        self.visit_u64(visitor)    {        where V: Visitor,    fn visit_u16<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `u16` value.    }        self.visit_u64(visitor)    {        where V: Visitor,    fn visit_u8<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>    #[inline]    /// This method hints that the `Deserialize` type is expecting an `u8` value.ad��>���RD�����{E�
�
�
�
�
b
!


��gf
���|H60/�
�
�
u
o
m
l
.



�	�	�	~	e	_	^	P		������    }      }        (**self).visit_key()    {        where K: Deserialize    fn visit_key<K>(&mut self) -> Result<Option<K>, V_::Error>    #[inline]    }        (**self).visit()    {              V: Deserialize,        where K: Deserialize,    fn visit<K, V>(&mut self) -> Result<Option<(K, V)>, V_::Error>    #[inline]    type Error = V_::Error;impl<'a, V_> MapVisitor for &'a mut V_ where V_: MapVisitor {}    }        Err(Error::missing_field(field))    {        where V: Deserialize,    fn missing_field<V>(&mut self, field: &'static str) -> Result<V, Self::Error>    /// Report that there     }        (0, None)    fn size_hint(&self) -> (usize, Option<usize>) {    #[inline]    /// Return the lower and upper bound of items remaining in the sequence.    fn end(&mut self) -> Result<(), Self::Error>;    /// This signals to the `MapVisitor` that the `Visitor` does not expect any more items.        where V: Deserialize;    fn visit_value<V>(&mut self) -> Result<V, Self::Error>    /// This returns a `Ok(value)` for the next value in the map.        where K: Deserialize;    fn visit_key<K>(&mut self) -> Result<Option<K>, Self::Error>    /// more remaining items.    /// This returns a `Ok(Some(key))` for the next key in the map, or `Ok(None)` if there are no    }        }            None => Ok(None)            }                Ok(Some((key, value)))                let value = try!(self.visit_value());            Some(key) => {        match try!(self.visit_key()) {    {              V: Deserialize,        where K: Deserialize,    fn visit<K, V>(&mut self) -> Result<Option<(K, V)>, Self::Error>    #[inline]    /// `Ok(None)` if there are no more remaining items.    /// This returns a `Ok(Some((key, value)))` for the next (key-value) pair in the map, or    type Error: Error;ad7q����g#����N60	�
�
z
t
S
M
L

������S������Q93�
�
}
e
_
>
8
7

�	�	�	�	|	{	B		������A)#����hb5/.����uon5������fX���U,&%����]WV	������a[ZL    #[inline]    }        Err(Error::type_mismatch(Type::Unit))    {        where E: Error,    fn visit_unit<E>(&mut self) -> Result<Self::Value, E>    }        self.visit_str(&v)                  /// `visit_string` deserializes a `String` into a `Value`.    }        Err(Error::type_mismatch(Type::Str))    {        where E: Error,    fn visit_str<E>(&mut self, _v: &str) -> Result<Self::Value, E>    /// `visit_str` deserializes a `&str` into a `Value`.    }        self.visit_string(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    {        where E: Error,    fn visit_char<E>(&mut self, v: char) -> Result<Self::Value, E>    #[inline]    /// `visit_char` deserializes a `char` into a `Value`.    }        Err(Error::type_mismatch(Type::F64))    {        where E: Error,    fn visit_f64<E>(&mut self, _v: f64) -> Result<Self::Value, E>    /// `visit_f64` deserializes a `f64` into a `Value`.    }        self.visit_f64(v as f64)    {        where E: Error,    fn visit_f32<E>(&mut self, v: f32) -> Result<Self::Value, E>    /// `visit_f32` deserializes a `f32` into a `Value`.    }        Err(Error::type_mismatch(Type::U64))    {        where E: Error,    fn visit_u64<E>(&mut self, _v: u64) -> Result<Self::Value, E>    /// `visit_u64` deserializes a `u64` into a `Value`.    }        self.visit_u64(v as u64)    {        where E: Error,    fn visit_u32<E>(&mut self, v: u32) -> Result<Self::Value, E>    /// `visit_u32` deserializes a `u32` into a `Value`.    }        self.visit_u64(v as u64)    {        where E: Error,    fn visit_u16<E>(&mut self, v: u16) -> Result<Self::Value, E>    /// `visit_u16` deserializes a `u16` into a `Value`.    }        self.visit_u64(v as u64)    {        where E: Error,    fn visit_u8<E>(&mut self, v: u8) -> Result<Self::Value, E>    /// `visit_u8` deserializes a `u8` into a `Value`.    }        self.visit_u64(v as u64)    {        where E: Error,    fn visit_usize<E>(&mut self, v: usize) -> Result<Self::Value, E>    /// `visit_usize` deserializes a `usize` into a `Value`.    }        Err(Error::type_mismatch(Type::I64))    {        where E: Error,    fn visit_i64<E>(&mut self, _v: i64) -> Result<Self::Value, E>    /// `visit_i64` deserializes a `i64` into a `Value`.    }        self.visit_i64(v as i64)    {        where E: Error,    fn visit_i32<E>(&mut self, v: i32) -> Result<Self::Value, E>    /// `visit_i32` deserializes a `i32` into a `Value`.    }        self.visit_i64(v as i64)    {        where E: Error,    fn visit_i16<E>(&mut self, v: i16) -> Result<Self::Value, E>    /// `visit_i16` deserializes a `i16` into a `Value`.    }        self.visit_i64(v as i64)    {        where E: Error,    fn visit_i8<E>(&mut self, v: i8) -> Result<Self::Value, E>    /// `visit_i8` deserializes a `i8` into a `Value`.    }        self.visit_i64(v as i64)    {        where E: Error,    fn visit_isize<E>(&mut self, v: isize) -> Result<Self::Value, E>    /// `visit_isize` deserializes a `isize` into a `Value`.    }        Err(Error::type_mismatch(Type::Bool))    {        where E: Error,    fn visit_bool<E>(&mut self, _v: bool) -> Result<Self::Value, E>    /// `visit_bool` deserializes a `bool` into a `Value`.    type Value: Deserialize;    /// The value produced by this visitor.pub trait Visitor {ad�
P����rlk2������^P      #[inline]    /// `visit_unit_struct` deserializes a unit struct into a `Value`.    }        Err(Error::type_mismatch(Type::Unit))    {        where E: Error,    fn visit_unit<E>(&mut self) -> Result<Self::Value, E>    /// `visit_unit` deserializes a `()` into a `Value`.    }        self.visit_str(&v)    {        where E: Error,    fn visit_string<E>(&mut self, v: String) -> Result<Self::Value, E>    #[inline]ad!@��������uedA.-��������tjiD10�
�
�
�
�
�
�
�
�
C
B

��eFDC���/+�
u
;
7
�	r		��z!3    /// The error type that can be returned if some error occurs during deserialization.pub trait Deserializer {///    `json::Value`-esque type.///    supporting the `visit_*` types is that it does not allow for deserializing into a generic///    the `visit_*` methods how it should parse the next value. One downside though to only///    it's values. It relies instead on the `Deserialize` type to hint to the `Deserializer` with/// 2) The `visit_*` methods. File formats like bincode do not embed in it's format how to decode//////    `json::Value`, which can represent all JSON types.///    format. This allows the `Deserializer` to deserialize into a generic type like/// 1) The `visit` method. File formats like JSON embed the type of it's construct in it's file////// value. It supports two entry point styles which enables different kinds of deserialization./// `Deserializer` is a trait that can deserialize values by threading a `Visitor` trait through a///////////////////////////////////////////////////////////////////////////////}        where D: Deserializer;    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>    /// Deserialize this value given this `Deserializer`.pub trait Deserialize: Sized {/// `Deserialize` represents a type that can be deserialized.///////////////////////////////////////////////////////////////////////////////}    Bytes,    /// Represents a `&[u8]` type.    UnitVariant,    /// Represents a unit variant.    TupleVariant,    /// Represents a tuple variant.    StructVariant,    /// Represents a struct variant.    Enum,    /// Represents an `enum` type.    Tuple,    /// Represents a tuple type.    Struct,    /// Represents a struct type.    TupleStruct,    /// Represents a tuple struct type.    NewtypeStruct,    /// Represents a newtype type.    UnitStruct,    /// Represents a unit struct type.    Map,    /// Represents a map type.    Seq,    /// Represents a sequence type.    Option,