pub struct ContainerDetectingReader { /* private fields */ }
Expand description
Wrapper that detects container format from underlying reader.
Implementations§
Source§impl ContainerDetectingReader
impl ContainerDetectingReader
pub fn new() -> Self
pub fn kind(&self) -> BitstreamKind
Sourcepub fn feed_bytes<'inner, 'buf>(
&'inner mut self,
input: &'buf [u8],
) -> ParseEvents<'inner, 'buf> ⓘ
pub fn feed_bytes<'inner, 'buf>( &'inner mut self, input: &'buf [u8], ) -> ParseEvents<'inner, 'buf> ⓘ
Feeds bytes to the parser, and receives parser events.
The parser might not consume all of the buffer. Use previous_consumed_bytes
to get how
many bytes are consumed. Bytes not consumed by the parser should be fed into the parser
again.
Sourcepub fn previous_consumed_bytes(&self) -> usize
pub fn previous_consumed_bytes(&self) -> usize
Get how many bytes are consumed by the previous call to feed_bytes
.
Bytes not consumed by the parser should be fed into the parser again.
Trait Implementations§
Source§impl Debug for ContainerDetectingReader
impl Debug for ContainerDetectingReader
Source§impl Default for ContainerDetectingReader
impl Default for ContainerDetectingReader
Source§fn default() -> ContainerDetectingReader
fn default() -> ContainerDetectingReader
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContainerDetectingReader
impl RefUnwindSafe for ContainerDetectingReader
impl Send for ContainerDetectingReader
impl Sync for ContainerDetectingReader
impl Unpin for ContainerDetectingReader
impl UnwindSafe for ContainerDetectingReader
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