Type Alias mutringbuf::ConcurrentHeapRB

source ·
pub type ConcurrentHeapRB<T> = ConcurrentMutRingBuf<HeapStorage<T>, T>;
Expand description

A heap-allocated ring buffer usable in concurrent environment.

Aliased Type§

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

Implementations§

source§

impl<T> ConcurrentHeapRB<T>

source

pub fn new(capacity: usize) -> Self

Creates a new concurrent heap-allocated buffer with given capacity and uninitialised elements.

source

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

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

Trait Implementations§

source§

impl<T> From<Vec<T>> for ConcurrentHeapRB<T>

source§

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

Converts to this type from the input type.