serde 0.4.3

A generic serialization/deserialization framework
b0VIM 7.4L§U�s�EericktErick-Tryzelaar-MBP.local~erickt/projects/rust/serde/serde/serde/src/de/mod.rsutf-8
3210#"! Utph��������mi��������z����������P����������dadN
h�����ihV76�����QP8�
�
�
�
�
F
E
��~���(�
h

�	�	�	�	d				��S93��_E?#��qWQ5/.���gaE?>���wqUON�����e_^	����qkj
	     /// expecting an enum value. This allows deserializers that provide a c    #[inline]    /// This method hints that the `Deserialize` type is expecting an `i8` value.    }        self.visit(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(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(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(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.    }        self.visit(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;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 {///////////////////////////////////////////////////////////////////////////////}    fn missing_field_error(field: &'static str) -> Self;    fn unknown_field_error(field: &str) -> Self;    fn end_of_stream_error() -> Self;    fn syntax_error() -> Self;pub trait Error {///////////////////////////////////////////////////////////////////////////////pub mod value;pub mod impls;//! Generic deserialization framework.ad�r_�����oRLJI���pXHG�
�
�
�
�
�
0
����n1��icb�
�
�
�
�
�
=
�	�	�	�	�	�	�	b	G	F		������lfe�����nhD><;�����vYWV����trq}        where V: MapVisitor;    fn visit<V>(&mut self, visitor: V) -> Result<Self::Value, V::Error>    type Value;pub trait EnumMapVisitor {///////////////////////////////////////////////////////////////////////////////}        where V: SeqVisitor;    fn visit<V>(&mut self, visitor: V) -> Result<Self::Value, V::Error>    type Value;pub trait EnumSeqVisitor {///////////////////////////////////////////////////////////////////////////////}    }        (**self).visit_map(visitor)    {        where V: Visitor,    fn visit_map<V>(&mut self, visitor: V) -> Result<V::Value, T::Error>    }        (**self).visit_seq(visitor)    {        where V: Visitor,    fn visit_seq<V>(&mut self, visitor: V) -> Result<V::Value, 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::syntax_error())    {        where V: Visitor    fn visit_map<V>(&mut self, _visitor: V) -> Result<V::Value, Self::Error>    /// `visit_map` is called when deserializing a struct-like variant.    }        Err(Error::syntax_error())    {        where V: Visitor    fn visit_seq<V>(&mut self, _visitor: V) -> Result<V::Value, Self::Error>    /// `visit_seq` is called when deserializing a tuple-like variant.    }        Err(Error::syntax_error())    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;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>    type Value;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> {ad�
7�����;�����V976}        where V: MapVisitor;    fn visit<V>(&mut self, visitor: V) -> Result<Self::Value, V::Error>    type Value;pub trait EnumMapVisitor {///////////////////////////////////////////////////////////////////////////////}        where V: SeqVisitor;    fn visit<V>(&mut self, visitor: V) -> Result<Self::Value, V::Error>    type Value;pub trait EnumSeqVisitor {///////////////////////////////////////////////////////////////////////////////ad������{c]C=<�����bC=�
�
�
�
z
y
,

	
�����{XRQ������sr[DC�
�
�
�
�
r
`
Z
X
W



�	�	�	�	|	v	u	g	7	 				�����a`I21#����uZ$�������ba&�����zy'	�����qpb������pSM0*)��������    #[inline]    }        (**self).visit_value()    {        where V: Deserialize    fn visit_value<V>(&mut self) -> Result<V, V_::Error>    #[inline]    }        (**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_error(field))    {        where V: Deserialize,    fn missing_field<V>(&mut self, field: &'static str) -> Result<V, Self::Error>    }        (0, None)    fn size_hint(&self) -> (usize, Option<usize>) {    #[inline]    fn end(&mut self) -> Result<(), Self::Error>;        where V: Deserialize;    fn visit_value<V>(&mut self) -> Result<V, Self::Error>        where K: Deserialize;    fn visit_key<K>(&mut self) -> Result<Option<K>, Self::Error>    }        }            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]    type Error: Error;pub trait MapVisitor {///////////////////////////////////////////////////////////////////////////////}    }        (**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]    fn end(&mut self) -> Result<(), Self::Error>;        where T: Deserialize;    fn visit<T>(&mut self) -> Result<Option<T>, Self::Error>    type Error: Error;pub trait SeqVisitor {///////////////////////////////////////////////////////////////////////////////}    }        self.visit_bytes(&v)    {        where E: Error,    fn visit_byte_buf<E>(&mut self, v: Vec<u8>) -> Result<Self::Value, E>    }        Err(Error::syntax_error())    {        where E: Error,    fn visit_bytes<E>(&mut self, _v: &[u8]) -> Result<Self::Value, E>    }        Err(Error::syntax_error())    {        where V: MapVisitor,    fn visit_map<V>(&mut self, _visitor: V) -> Result<Self::Value, V::Error>    }        Err(Error::syntax_error())    {        where V: SeqVisitor,    fn visit_seq<V>(&mut self, _visitor: V) -> Result<Self::Value, V::Error>    }        Err(Error::syntax_error())    {        where D: Deserializer,    fn visit_some<D>(&mut self, _deserializer: &mut D) -> Result<Self::Value, D::Error>    }        Err(Error::syntax_error())    {        where E: Error,    fn visit_none<E>(&mut self) -> Result<Self::Value, E>    }        self.visit_unit()    {        where E: Error,    fn visit_named_unit<E>(&mut self, _name: &str) -> Result<Self::Value, E>    #[inline]    }        Err(Error::syntax_error())