pub struct Lz4FrameEncoder { /* private fields */ }
Expand description
Post-V5 Lz4 encoder with support for envelope frames with CRC checksum.
Trait Implementations§
Source§impl Clone for Lz4FrameEncoder
impl Clone for Lz4FrameEncoder
Source§fn clone(&self) -> Lz4FrameEncoder
fn clone(&self) -> Lz4FrameEncoder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Lz4FrameEncoder
impl Debug for Lz4FrameEncoder
Source§impl Default for Lz4FrameEncoder
impl Default for Lz4FrameEncoder
Source§impl FrameEncoder for Lz4FrameEncoder
impl FrameEncoder for Lz4FrameEncoder
Source§fn can_fit(&self, len: usize) -> bool
fn can_fit(&self, len: usize) -> bool
Determines if payload of given size can fit in current frame buffer.
Source§fn add_envelope(&mut self, envelope: Vec<u8>)
fn add_envelope(&mut self, envelope: Vec<u8>)
Adds a self-contained envelope to current frame.
Source§fn finalize_self_contained(&mut self) -> &[u8] ⓘ
fn finalize_self_contained(&mut self) -> &[u8] ⓘ
Finalizes a self-contained encoded frame in the buffer.
Source§fn finalize_non_self_contained(&mut self, envelope: &[u8]) -> (usize, &[u8])
fn finalize_non_self_contained(&mut self, envelope: &[u8]) -> (usize, &[u8])
Appends a large envelope and finalizes non self-contained encoded frame in the buffer.
Copies as much envelope data as possible and returns new envelope buffer start.
Source§fn has_envelopes(&self) -> bool
fn has_envelopes(&self) -> bool
Checks if current frame contains any envelopes.
Auto Trait Implementations§
impl Freeze for Lz4FrameEncoder
impl RefUnwindSafe for Lz4FrameEncoder
impl Send for Lz4FrameEncoder
impl Sync for Lz4FrameEncoder
impl Unpin for Lz4FrameEncoder
impl UnwindSafe for Lz4FrameEncoder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more