pub struct Ring<T: Sized> { /* private fields */ }
Expand description
Circular version of Buffer
Because Buffer
is circular, it always has remaining bytes to write.
But care must be taken because without consuming already written bytes, it is easy to over-write
as ring buffer always has capacity.
Implementations§
Trait Implementations§
Source§impl<S: Sized> ReadBuf for Ring<S>
impl<S: Sized> ReadBuf for Ring<S>
Auto Trait Implementations§
impl<T> Freeze for Ring<T>where
T: Freeze,
impl<T> RefUnwindSafe for Ring<T>where
T: RefUnwindSafe,
impl<T> Send for Ring<T>where
T: Send,
impl<T> Sync for Ring<T>where
T: Sync,
impl<T> Unpin for Ring<T>where
T: Unpin,
impl<T> UnwindSafe for Ring<T>where
T: UnwindSafe,
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> ReadBufExt for Twhere
T: ReadBuf,
impl<T> ReadBufExt for Twhere
T: ReadBuf,
Source§fn read_value<T: Copy + Sized>(&mut self, val: &mut MaybeUninit<T>) -> usize
fn read_value<T: Copy + Sized>(&mut self, val: &mut MaybeUninit<T>) -> usize
Reads value into storage. Read more