Struct laminarmq_io::anchored_buffer::Buffer
source · pub struct Buffer { /* private fields */ }
Implementations§
source§impl Buffer
impl Buffer
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn avail_to_append(&self) -> usize
pub fn get_read_slice<R>(&mut self, range: R) -> Result<Bytes, BufferError>where
R: RangeBounds<usize>,
pub fn get_append_slice_mut(&mut self) -> Result<BytesMut, BufferError>
pub fn unsplit_append_slice( &mut self, append_bytes_mut: BytesMut, bytes_written: usize, ) -> Result<(), BufferError>
pub fn clear(&mut self)
pub fn contains(&self, pos: usize) -> bool
pub fn contains_within_capacity(&self, pos: usize) -> bool
pub fn truncate(&mut self, pos: usize) -> Result<(), BufferError>
Auto Trait Implementations§
impl !Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.