pub struct Framing;Implementations§
Source§impl Framing
impl Framing
Sourcepub fn delimiter(
delimiter: u8,
max_frame_length: usize,
) -> Flow<Bytes, Result<Bytes, FramingError>>
pub fn delimiter( delimiter: u8, max_frame_length: usize, ) -> Flow<Bytes, Result<Bytes, FramingError>>
Split an incoming Bytes stream using a single-byte delimiter, dropping
the delimiter from each produced frame.
Sourcepub fn length_field(
max_frame_length: usize,
) -> Flow<Bytes, Result<Bytes, FramingError>>
pub fn length_field( max_frame_length: usize, ) -> Flow<Bytes, Result<Bytes, FramingError>>
Split by length-prefixed frames. The prefix is a little-endian u32 giving the size of the payload.
Auto Trait Implementations§
impl Freeze for Framing
impl RefUnwindSafe for Framing
impl Send for Framing
impl Sync for Framing
impl Unpin for Framing
impl UnsafeUnpin for Framing
impl UnwindSafe for Framing
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