pub struct LengthDelimited { /* private fields */ }
Expand description
A simple extractor that frames data by its length.
It uses 8 bytes to represent the length of the data at the beginning.
Implementations§
Source§impl LengthDelimited
impl LengthDelimited
Sourcepub fn length_field_len(&self) -> usize
pub fn length_field_len(&self) -> usize
Returns the length of the length field in bytes.
Sourcepub fn set_length_field_len(self, len_field_len: usize) -> Self
pub fn set_length_field_len(self, len_field_len: usize) -> Self
Sets the length of the length field in bytes.
Sourcepub fn length_field_is_big_endian(&self) -> bool
pub fn length_field_is_big_endian(&self) -> bool
Returns whether the length field is big-endian.
Sourcepub fn set_length_field_is_big_endian(self, big_endian: bool) -> Self
pub fn set_length_field_is_big_endian(self, big_endian: bool) -> Self
Sets whether the length field is big-endian.
Trait Implementations§
Source§impl Clone for LengthDelimited
impl Clone for LengthDelimited
Source§fn clone(&self) -> LengthDelimited
fn clone(&self) -> LengthDelimited
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 LengthDelimited
impl Debug for LengthDelimited
Source§impl Default for LengthDelimited
impl Default for LengthDelimited
Source§impl Framer for LengthDelimited
impl Framer for LengthDelimited
Source§impl Hash for LengthDelimited
impl Hash for LengthDelimited
Source§impl Ord for LengthDelimited
impl Ord for LengthDelimited
Source§fn cmp(&self, other: &LengthDelimited) -> Ordering
fn cmp(&self, other: &LengthDelimited) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LengthDelimited
impl PartialEq for LengthDelimited
Source§impl PartialOrd for LengthDelimited
impl PartialOrd for LengthDelimited
impl Copy for LengthDelimited
impl Eq for LengthDelimited
impl StructuralPartialEq for LengthDelimited
Auto Trait Implementations§
impl Freeze for LengthDelimited
impl RefUnwindSafe for LengthDelimited
impl Send for LengthDelimited
impl Sync for LengthDelimited
impl Unpin for LengthDelimited
impl UnwindSafe for LengthDelimited
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