Type Alias mutringbuf::LocalHeapRB

source ·
pub type LocalHeapRB<T> = LocalMutRingBuf<HeapStorage<T>, T>;
Expand description

A heap-allocated ring buffer usable in local environment.

Aliased Type§

struct LocalHeapRB<T> { /* private fields */ }

Implementations§

source§

impl<T> LocalHeapRB<T>

source

pub fn new(capacity: usize) -> Self

Creates a new local heap-allocated buffer with given capacity.

source

pub fn default(capacity: usize) -> Self
where T: Default + Clone,

Creates a new local heap-allocated buffer with given capacity and elements initialised to default.

Trait Implementations§

source§

impl<T> From<Vec<T>> for LocalHeapRB<T>

source§

fn from(value: Vec<T>) -> Self

Converts to this type from the input type.