ListDecoder

Struct ListDecoder 

Source
pub struct ListDecoder<'obj, 'ser: 'obj> { /* private fields */ }
Expand description

A list read from the input stream

Implementations§

Source§

impl<'obj, 'ser: 'obj> ListDecoder<'obj, 'ser>

Source

pub fn next_object<'item>( &'item mut self, ) -> Result<Option<Object<'item, 'ser>>, Error>

Get the next item from the list. Returns Ok(None) at the end of the list

Source

pub fn consume_all(&mut self) -> Result<(), Error>

Consume (and validate the structure of) the rest of the items from the list. This method should be used to check for encoding errors if ListDecoder::next_object is not called until it returns Ok(()).

Source

pub fn into_raw(self) -> Result<&'ser [u8], Error>

Get the raw bytes that made up this list

Trait Implementations§

Source§

impl<'obj, 'ser: 'obj> Debug for ListDecoder<'obj, 'ser>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'obj, 'ser: 'obj> Drop for ListDecoder<'obj, 'ser>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'obj, 'ser> TryFrom<ListDecoder<'obj, 'ser>> for InList<'ser>

Source§

type Error = Error

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

fn try_from(ld: ListDecoder<'obj, 'ser>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'obj, 'ser> Freeze for ListDecoder<'obj, 'ser>

§

impl<'obj, 'ser> !RefUnwindSafe for ListDecoder<'obj, 'ser>

§

impl<'obj, 'ser> Send for ListDecoder<'obj, 'ser>

§

impl<'obj, 'ser> Sync for ListDecoder<'obj, 'ser>

§

impl<'obj, 'ser> Unpin for ListDecoder<'obj, 'ser>

§

impl<'obj, 'ser> !UnwindSafe for ListDecoder<'obj, 'ser>

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.