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>
impl<'obj, 'ser: 'obj> ListDecoder<'obj, 'ser>
Sourcepub fn next_object<'item>(
&'item mut self,
) -> Result<Option<Object<'item, 'ser>>, Error>
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
Sourcepub fn consume_all(&mut self) -> Result<(), Error>
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(()).
Trait Implementations§
Source§impl<'obj, 'ser: 'obj> Debug for ListDecoder<'obj, 'ser>
impl<'obj, 'ser: 'obj> Debug for ListDecoder<'obj, 'ser>
Source§impl<'obj, 'ser: 'obj> Drop for ListDecoder<'obj, 'ser>
impl<'obj, 'ser: 'obj> Drop for ListDecoder<'obj, 'ser>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more