pub struct StreamParser<T: AsRef<[u8]>> { /* private fields */ }
Expand description
A parser for individual bitstream entries.
This structure is not a general-purpose parser for bitstream inputs:
it expects to be given a prepared BitCursor
whose internal
state is correct (i.e., has been advanced past the initial input magic).
For a general-purpose parser with the correct state management, see
Bitstream
.
Implementations§
Source§impl<T: AsRef<[u8]>> StreamParser<T>
impl<T: AsRef<[u8]>> StreamParser<T>
Sourcepub fn advance(&mut self) -> Result<StreamEntry, Error>
pub fn advance(&mut self) -> Result<StreamEntry, Error>
Return the next StreamEntry
in this bitstream.
Returns an error on any parsing error, or the special
Error::Exhausted
if the bitstream has
been fully consumed.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for StreamParser<T>where
T: Freeze,
impl<T> RefUnwindSafe for StreamParser<T>where
T: RefUnwindSafe,
impl<T> Send for StreamParser<T>where
T: Send,
impl<T> Sync for StreamParser<T>where
T: Sync,
impl<T> Unpin for StreamParser<T>where
T: Unpin,
impl<T> UnwindSafe for StreamParser<T>where
T: 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