pub struct StreamDecoder { /* private fields */ }Expand description
Streaming decoder state.
Implementations§
Source§impl StreamDecoder
impl StreamDecoder
pub fn new() -> Self
Sourcepub fn with_limits(self, limits: Limits) -> Self
pub fn with_limits(self, limits: Limits) -> Self
Use explicit decode limits for the reassembled image and for every intermediate bound.
Sourcepub fn push_bytes(&mut self, buf: &[u8]) -> Result<()>
pub fn push_bytes(&mut self, buf: &[u8]) -> Result<()>
Feed raw frame bytes. Frames may be split across calls and several may arrive in one call; partial frames are buffered.
Sourcepub fn module(&self) -> Option<&InfinityModule>
pub fn module(&self) -> Option<&InfinityModule>
The reassembled module, once a generation completed.
Sourcepub fn image(&self) -> Option<&[u8]>
pub fn image(&self) -> Option<&[u8]>
The reassembled canonical image, once a generation completed.
Sourcepub fn finish(self) -> Result<StreamedModule>
pub fn finish(self) -> Result<StreamedModule>
Finish the stream, requiring at least one completed generation and no half-received frame left over.
Trait Implementations§
Source§impl Debug for StreamDecoder
impl Debug for StreamDecoder
Auto Trait Implementations§
impl Freeze for StreamDecoder
impl RefUnwindSafe for StreamDecoder
impl Send for StreamDecoder
impl Sync for StreamDecoder
impl Unpin for StreamDecoder
impl UnsafeUnpin for StreamDecoder
impl UnwindSafe for StreamDecoder
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