Struct async_ringbuf::ring_buffer::AsyncRb
source · [−]pub struct AsyncRb<T, B: Rb<T>> { /* private fields */ }
Implementations
sourceimpl<T, B: Rb<T>> AsyncRb<T, B>
impl<T, B: Rb<T>> AsyncRb<T, B>
pub fn from_base(base: B) -> Self
pub fn into_base(self) -> B
pub fn split_ref(
&mut self
) -> (AsyncProducer<T, &Self>, AsyncConsumer<T, &Self>)
sourceimpl<T, C: Container<T>> AsyncRb<T, LocalRb<T, C>>
impl<T, C: Container<T>> AsyncRb<T, LocalRb<T, C>>
pub fn split(self) -> (AsyncProducer<T, Rc<Self>>, AsyncConsumer<T, Rc<Self>>)
pub fn split(self) -> (AsyncProducer<T, Arc<Self>>, AsyncConsumer<T, Arc<Self>>)
Trait Implementations
sourceimpl<T, B: Rb<T>> AsyncRbRead<T> for AsyncRb<T, B>
impl<T, B: Rb<T>> AsyncRbRead<T> for AsyncRb<T, B>
unsafe fn register_tail_waker(&self, waker: &Waker)
unsafe fn close_head(&self)
sourceimpl<T, B: Rb<T>> AsyncRbWrite<T> for AsyncRb<T, B>
impl<T, B: Rb<T>> AsyncRbWrite<T> for AsyncRb<T, B>
unsafe fn register_head_waker(&self, waker: &Waker)
unsafe fn close_tail(&self)
sourceimpl<T, B: Rb<T>> RbBase<T> for AsyncRb<T, B>
impl<T, B: Rb<T>> RbBase<T> for AsyncRb<T, B>
sourceunsafe fn data(&self) -> &mut [MaybeUninit<T>]
unsafe fn data(&self) -> &mut [MaybeUninit<T>]
Returns underlying raw ring buffer memory as slice. Read more
sourcefn capacity(&self) -> NonZeroUsize
fn capacity(&self) -> NonZeroUsize
Capacity of the ring buffer. Read more
sourcefn modulus(&self) -> NonZeroUsize
fn modulus(&self) -> NonZeroUsize
Modulus for head
and tail
values. Read more
sourcefn occupied_len(&self) -> usize
fn occupied_len(&self) -> usize
The number of items stored in the buffer at the moment.
sourcefn vacant_len(&self) -> usize
fn vacant_len(&self) -> usize
The number of vacant places in the buffer at the moment.
sourceimpl<T, B: Rb<T>> RbRead<T> for AsyncRb<T, B>
impl<T, B: Rb<T>> RbRead<T> for AsyncRb<T, B>
sourceunsafe fn advance_head(&self, count: usize)
unsafe fn advance_head(&self, count: usize)
Move head position by count
items forward. Read more
sourcefn occupied_ranges(&self) -> (Range<usize>, Range<usize>)
fn occupied_ranges(&self) -> (Range<usize>, Range<usize>)
Returns a pair of slices which contain, in order, the occupied cells in the ring buffer. Read more
sourceunsafe fn occupied_slices(
&self
) -> (&mut [MaybeUninit<T>], &mut [MaybeUninit<T>])
unsafe fn occupied_slices(
&self
) -> (&mut [MaybeUninit<T>], &mut [MaybeUninit<T>])
Provides a direct mutable access to the ring buffer occupied memory. Read more
sourceimpl<T, B: Rb<T>> RbWrite<T> for AsyncRb<T, B>
impl<T, B: Rb<T>> RbWrite<T> for AsyncRb<T, B>
sourceunsafe fn advance_tail(&self, count: usize)
unsafe fn advance_tail(&self, count: usize)
Move tail position by count
items forward. Read more
sourcefn vacant_ranges(&self) -> (Range<usize>, Range<usize>)
fn vacant_ranges(&self) -> (Range<usize>, Range<usize>)
Returns a pair of slices which contain, in order, the vacant cells in the ring buffer. Read more
sourceunsafe fn vacant_slices(&self) -> (&mut [MaybeUninit<T>], &mut [MaybeUninit<T>])
unsafe fn vacant_slices(&self) -> (&mut [MaybeUninit<T>], &mut [MaybeUninit<T>])
Provides a direct access to the ring buffer vacant memory. Returns a pair of slices of uninitialized memory, the second one may be empty. Read more
impl<T, B: Rb<T>> Rb<T> for AsyncRb<T, B>
Auto Trait Implementations
impl<T, B> !RefUnwindSafe for AsyncRb<T, B>
impl<T, B> Send for AsyncRb<T, B> where
B: Send,
T: Send,
impl<T, B> Sync for AsyncRb<T, B> where
B: Sync,
T: Sync,
impl<T, B> Unpin for AsyncRb<T, B> where
B: Unpin,
T: Unpin,
impl<T, B> UnwindSafe for AsyncRb<T, B> where
B: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more