pub struct Decoder { /* private fields */ }Expand description
Synchronous frame decoder. It knows no logical ranges or I/O offsets. Authentication precedes decompression. Reuse one instance and the caller’s buffer to amortize allocations. Compression may swap the buffer allocation.
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn decode_frame(
&mut self,
spec: FrameSpec,
buffer: &mut Vec<u8>,
) -> Result<()>
pub fn decode_frame( &mut self, spec: FrameSpec, buffer: &mut Vec<u8>, ) -> Result<()>
Replace one complete stored frame with its complete decoded bytes. On failure the buffer is cleared. No unauthenticated bytes are returned. Clearing the buffer is not a promise to zero its allocation or scratch.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
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