Bytes2Deserializer

Struct Bytes2Deserializer 

Source
pub struct Bytes2Deserializer<'a, 'b> { /* private fields */ }

Implementations§

Source§

impl<'a, 'b> Bytes2Deserializer<'a, 'b>

Source

pub fn as_slice(&self) -> Result<&[u8], DeserializeError>

Source

pub fn advance(&mut self, cnt: usize) -> Result<(), DeserializeError>

Source

pub fn deserialize_extend<T>( self, bytes: &mut T, ) -> Result<(), DeserializeError>
where T: Extend<u8>,

Source

pub fn skip(self) -> Result<(), DeserializeError>

Source

pub fn finish<T>(self, t: T) -> Result<T, DeserializeError>

Source

pub fn finish_with<T, F>(self, f: F) -> Result<T, DeserializeError>
where F: FnOnce() -> Result<T, DeserializeError>,

Source

pub fn skip_and_finish<T>(self, t: T) -> Result<T, DeserializeError>

Source

pub fn skip_and_finish_with<T, F>(self, f: F) -> Result<T, DeserializeError>
where F: FnOnce() -> Result<T, DeserializeError>,

Trait Implementations§

Source§

impl<'a, 'b> Debug for Bytes2Deserializer<'a, 'b>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, 'b> Freeze for Bytes2Deserializer<'a, 'b>

§

impl<'a, 'b> RefUnwindSafe for Bytes2Deserializer<'a, 'b>

§

impl<'a, 'b> Send for Bytes2Deserializer<'a, 'b>

§

impl<'a, 'b> Sync for Bytes2Deserializer<'a, 'b>

§

impl<'a, 'b> Unpin for Bytes2Deserializer<'a, 'b>

§

impl<'a, 'b> !UnwindSafe for Bytes2Deserializer<'a, 'b>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.