pub struct HandoffBuffer { /* private fields */ }Implementations§
Source§impl HandoffBuffer
impl HandoffBuffer
pub fn new(max_len: usize) -> Self
pub fn with_config(config: HandoffBufferConfig) -> Self
pub fn from_tail( tail: BytesMut, config: HandoffBufferConfig, ) -> Result<Self, BufferError>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn peek(&self) -> &[u8] ⓘ
pub fn reserve_read_capacity( &mut self, additional: usize, ) -> Result<(), BufferError>
pub async fn read_available<R>( &mut self, reader: &mut R, ) -> Result<usize, BufferError>
pub fn split_prefix(&mut self, n: usize) -> Result<Bytes, BufferError>
pub fn split_prefix_mut(&mut self, n: usize) -> Result<BytesMut, BufferError>
pub fn freeze_all(&mut self) -> Bytes
pub fn take_tail(&mut self) -> BytesMut
pub fn advance(&mut self, cnt: usize) -> Result<(), BufferError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HandoffBuffer
impl RefUnwindSafe for HandoffBuffer
impl Send for HandoffBuffer
impl Sync for HandoffBuffer
impl Unpin for HandoffBuffer
impl UnsafeUnpin for HandoffBuffer
impl UnwindSafe for HandoffBuffer
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