pub struct TopElementReader<'reader, 'bundle>(/* private fields */);Expand description
The simple variant of element, provides direct decoding using a codec.
Implementations§
Source§impl TopElementReader<'_, '_>
impl TopElementReader<'_, '_>
Sourcepub fn read_stable<E: TopElement>(
&mut self,
config: &E::Config,
) -> BundleResult<BundleElement<E>>
pub fn read_stable<E: TopElement>( &mut self, config: &E::Config, ) -> BundleResult<BundleElement<E>>
Same as read but never go to the next element (this is why this method doesn’t take
self by value).
pub fn read_simple_stable<E: TopElement<Config = ()>>( &mut self, ) -> BundleResult<BundleElement<E>>
Sourcepub fn read<E: TopElement>(
self,
config: &E::Config,
) -> BundleResult<BundleElement<E>>
pub fn read<E: TopElement>( self, config: &E::Config, ) -> BundleResult<BundleElement<E>>
Read the element using the given codec. This method take self by value and automatically
go the next element if read is successful, if not successful you will need to call
Bundle::next_element again.
pub fn read_simple<E: TopElement<Config = ()>>( self, ) -> BundleResult<BundleElement<E>>
Trait Implementations§
Auto Trait Implementations§
impl<'reader, 'bundle> Freeze for TopElementReader<'reader, 'bundle>
impl<'reader, 'bundle> RefUnwindSafe for TopElementReader<'reader, 'bundle>
impl<'reader, 'bundle> Send for TopElementReader<'reader, 'bundle>
impl<'reader, 'bundle> Sync for TopElementReader<'reader, 'bundle>
impl<'reader, 'bundle> Unpin for TopElementReader<'reader, 'bundle>
impl<'reader, 'bundle> !UnwindSafe for TopElementReader<'reader, 'bundle>
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