pub struct Alternative<'a> { /* private fields */ }Expand description
The octets of one alternative, as delimited by the length field.
Implementations§
Source§impl<'a> Alternative<'a>
impl<'a> Alternative<'a>
Sourcepub fn reader(&mut self) -> &mut ByteReader<'a>
pub fn reader(&mut self) -> &mut ByteReader<'a>
Reader limited to the alternative; decode the alternative datatype from it.
Sourcepub fn finish(self) -> Result<(), DecoderError>
pub fn finish(self) -> Result<(), DecoderError>
Checks that the alternative datatype used exactly the announced length.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
The octets not consumed so far; the whole alternative when it is skipped.
Trait Implementations§
Source§impl<'a> Clone for Alternative<'a>
impl<'a> Clone for Alternative<'a>
Auto Trait Implementations§
impl<'a> Forget for Alternative<'a>
impl<'a> Freeze for Alternative<'a>
impl<'a> Move for Alternative<'a>
impl<'a> RefUnwindSafe for Alternative<'a>
impl<'a> Send for Alternative<'a>
impl<'a> Sync for Alternative<'a>
impl<'a> Unpin for Alternative<'a>
impl<'a> UnsafeUnpin for Alternative<'a>where
&'a [u8]: UnsafeUnpin,
impl<'a> UnwindSafe for Alternative<'a>where
&'a [u8]: UnwindSafe,
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