pub type Obs<R> = Direct<R, false, false>;
Expand description
Observer of a ring buffer.
Aliased Type§
struct Obs<R> { /* private fields */ }
Implementations
Trait Implementations§
Source§impl<R: RbRef, const P: bool, const C: bool> Observer for Direct<R, P, C>
impl<R: RbRef, const P: bool, const C: bool> Observer for Direct<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