Skip to main content

DeserializationContext

Struct DeserializationContext 

Source
pub struct DeserializationContext<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> DeserializationContext<'a>

Source

pub fn new(input: &'a [u8], options: Options) -> DeserializationContext<'a>

Source

pub fn state(&self) -> &State

Source

pub fn state_mut(&mut self) -> &mut State

Source

pub fn try_read_ref(&mut self) -> Result<Option<&(dyn Any + 'static)>, Error>

Trait Implementations§

Source§

impl BinaryInput for DeserializationContext<'_>

Source§

fn read_u8(&mut self) -> Result<u8, Error>

Source§

fn read_bytes(&mut self, count: usize) -> Result<&[u8], Error>

Source§

fn skip(&mut self, count: usize) -> Result<(), Error>

Source§

fn read_i8(&mut self) -> Result<i8, Error>

Source§

fn read_u16(&mut self) -> Result<u16, Error>

Source§

fn read_i16(&mut self) -> Result<i16, Error>

Source§

fn read_u32(&mut self) -> Result<u32, Error>

Source§

fn read_i32(&mut self) -> Result<i32, Error>

Source§

fn read_u64(&mut self) -> Result<u64, Error>

Source§

fn read_i64(&mut self) -> Result<i64, Error>

Source§

fn read_u128(&mut self) -> Result<u128, Error>

Source§

fn read_i128(&mut self) -> Result<i128, Error>

Source§

fn read_f32(&mut self) -> Result<f32, Error>

Source§

fn read_f64(&mut self) -> Result<f64, Error>

Source§

fn read_var_u32(&mut self) -> Result<u32, Error>

Source§

fn read_var_i32(&mut self) -> Result<i32, Error>

Source§

fn read_compressed(&mut self) -> Result<Vec<u8>, Error>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.