AsyncStackRB

Type Alias AsyncStackRB 

Source
pub type AsyncStackRB<T, const N: usize> = AsyncMutRingBuf<StackStorage<T, N>>;
Available on non-crate feature vmem and crate feature async only.
Expand description

A stack-allocated asynchronous ring buffer usable in concurrent environment.

Aliased Type§

pub struct AsyncStackRB<T, const N: usize> { /* private fields */ }

Implementations§

Source§

impl<T, const N: usize> AsyncStackRB<T, N>

Source

pub unsafe fn new_zeroed() -> Self

Creates a new AsyncStackRB with given capacity and zeroed (uninitialised) elements.

§Safety

The buffer must be then initialised using proper ProdIter methods (*_init ones).

Trait Implementations§

Source§

impl<T: Default + Copy, const N: usize> Default for AsyncStackRB<T, N>

Source§

fn default() -> Self

Creates a new AsyncStackRB with given capacity and elements initialised to default.

Source§

impl<T, const N: usize> From<[T; N]> for AsyncStackRB<T, N>

Source§

fn from(value: [T; N]) -> Self

Converts an array into a AsyncStackRB.