LocalStackRB

Type Alias LocalStackRB 

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

A stack-allocated ring buffer usable in local environment.

Aliased Type§

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

Implementations§

Source§

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

Source

pub unsafe fn new_zeroed() -> Self

Creates a new LocalStackRB 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 LocalStackRB<T, N>

Source§

fn default() -> Self

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

Source§

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

Source§

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

Converts an array into a LocalStackRB.