Struct bincode::de::Deserializer [−][src]
A Deserializer that reads bytes from a buffer.
This struct should rarely be used.
In most cases, prefer the deserialize_from
function.
The ByteOrder that is chosen will impact the endianness that is used to read integers out of the reader.
let d = Deserializer::new(&mut some_reader, SizeLimit::new()); serde::Deserialize::deserialize(&mut deserializer); let bytes_read = d.bytes_read();
Implementations
impl<'de, IR: Read, O: Options> Deserializer<IoReader<IR>, O>
[src]
pub fn with_reader(r: IR, options: O) -> Self
[src]
Creates a new Deserializer with a given Read
er and options.
impl<'de, O: Options> Deserializer<SliceReader<'de>, O>
[src]
pub fn from_slice(slice: &'de [u8], options: O) -> Self
[src]
Creates a new Deserializer that will read from the given slice.
impl<'de, R: BincodeRead<'de>, O: Options> Deserializer<R, O>
[src]
pub fn with_bincode_read(r: R, options: O) -> Deserializer<R, O>
[src]
Creates a new Deserializer with the given BincodeRead
er
Trait Implementations
impl<'de, 'a, R, O> Deserializer<'de> for &'a mut Deserializer<R, O> where
R: BincodeRead<'de>,
O: Options,
[src]
R: BincodeRead<'de>,
O: Options,
type Error = Error
The error type that can be returned if some error occurs during deserialization. Read more
fn deserialize_any<V>(self, _visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_char<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_str<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_string<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
_enum: &'static str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_enum: &'static str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_tuple<V>(self, len: usize, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_map<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
_name: &str,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_name: &str,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_identifier<V>(self, _visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_newtype_struct<V>(
self,
_name: &str,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_name: &str,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_unit_struct<V>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_name: &'static str,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_tuple_struct<V>(
self,
_name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_ignored_any<V>(self, _visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn is_human_readable(&self) -> bool
[src]
impl<'de, 'a, R: 'a, O> EnumAccess<'de> for &'a mut Deserializer<R, O> where
R: BincodeRead<'de>,
O: Options,
[src]
R: BincodeRead<'de>,
O: Options,
type Error = Error
The error type that can be returned if some error occurs during deserialization. Read more
type Variant = Self
The Visitor
that will be used to deserialize the content of the enum
variant. Read more
fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant)> where
V: DeserializeSeed<'de>,
[src]
V: DeserializeSeed<'de>,
pub fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error> where
V: Deserialize<'de>,
[src]
V: Deserialize<'de>,
impl<'de, 'a, R, O> VariantAccess<'de> for &'a mut Deserializer<R, O> where
R: BincodeRead<'de>,
O: Options,
[src]
R: BincodeRead<'de>,
O: Options,
type Error = Error
The error type that can be returned if some error occurs during
deserialization. Must match the error type of our EnumAccess
. Read more
fn unit_variant(self) -> Result<()>
[src]
fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value> where
T: DeserializeSeed<'de>,
[src]
T: DeserializeSeed<'de>,
fn tuple_variant<V>(self, len: usize, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn struct_variant<V>(
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
pub fn newtype_variant<T>(self) -> Result<T, Self::Error> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
Auto Trait Implementations
impl<R, O> RefUnwindSafe for Deserializer<R, O> where
O: RefUnwindSafe,
R: RefUnwindSafe,
O: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, O> Send for Deserializer<R, O> where
O: Send,
R: Send,
O: Send,
R: Send,
impl<R, O> Sync for Deserializer<R, O> where
O: Sync,
R: Sync,
O: Sync,
R: Sync,
impl<R, O> Unpin for Deserializer<R, O> where
O: Unpin,
R: Unpin,
O: Unpin,
R: Unpin,
impl<R, O> UnwindSafe for Deserializer<R, O> where
O: UnwindSafe,
R: UnwindSafe,
O: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,