pub struct Frozen<R: RbRef, const P: bool, const C: bool> { /* private fields */ }
Expand description
Frozen wrapper of the ring buffer.
Implementations§
Trait Implementations§
Source§impl<R: RbRef, const P: bool, const C: bool> Observer for Frozen<R, P, C>
impl<R: RbRef, const P: bool, const C: bool> Observer for Frozen<R, P, C>
type Item = <<R as RbRef>::Rb as Observer>::Item
Source§fn capacity(&self) -> NonZeroUsize
fn capacity(&self) -> NonZeroUsize
Capacity of the ring buffer. Read more
Source§fn read_index(&self) -> usize
fn read_index(&self) -> usize
Index of the last item in the ring buffer. Read more
Source§fn write_index(&self) -> usize
fn write_index(&self) -> usize
Index of the next empty slot in the ring buffer. Read more
Source§unsafe fn unsafe_slices(
&self,
start: usize,
end: usize,
) -> (&[MaybeUninit<Self::Item>], &[MaybeUninit<Self::Item>])
unsafe fn unsafe_slices( &self, start: usize, end: usize, ) -> (&[MaybeUninit<Self::Item>], &[MaybeUninit<Self::Item>])
Source§unsafe fn unsafe_slices_mut(
&self,
start: usize,
end: usize,
) -> (&mut [MaybeUninit<Self::Item>], &mut [MaybeUninit<Self::Item>])
unsafe fn unsafe_slices_mut( &self, start: usize, end: usize, ) -> (&mut [MaybeUninit<Self::Item>], &mut [MaybeUninit<Self::Item>])
Source§fn read_is_held(&self) -> bool
fn read_is_held(&self) -> bool
Whether read end is held by consumer.
Source§fn write_is_held(&self) -> bool
fn write_is_held(&self) -> bool
Whether write end is held by producer.
Source§fn occupied_len(&self) -> usize
fn occupied_len(&self) -> usize
The number of items stored in the buffer. Read more
Source§fn vacant_len(&self) -> usize
fn vacant_len(&self) -> usize
The number of remaining free places in the buffer. Read more
Auto Trait Implementations§
impl<R, const P: bool, const C: bool> !Freeze for Frozen<R, P, C>
impl<R, const P: bool, const C: bool> !RefUnwindSafe for Frozen<R, P, C>
impl<R, const P: bool, const C: bool> Send for Frozen<R, P, C>where
R: Send,
impl<R, const P: bool, const C: bool> !Sync for Frozen<R, P, C>
impl<R, const P: bool, const C: bool> Unpin for Frozen<R, P, C>where
R: Unpin,
impl<R, const P: bool, const C: bool> UnwindSafe for Frozen<R, P, C>where
R: 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