ringbuf::storage

Type Alias Slice

Source
pub type Slice<T> = Owning<[MaybeUninit<T>]>;

Aliased Type§

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

Trait Implementations§

Source§

impl<T> Storage for Slice<T>

Source§

type Item = T

Stored item.
Source§

fn as_mut_ptr(&self) -> *mut MaybeUninit<T>

Return mutable pointer to the beginning of the storage items.
Source§

fn len(&self) -> usize

Length of the storage.
Source§

fn is_empty(&self) -> bool

Source§

fn as_ptr(&self) -> *const MaybeUninit<Self::Item>

Return pointer to the beginning of the storage items.
Source§

unsafe fn slice(&self, range: Range<usize>) -> &[MaybeUninit<Self::Item>]

Returns a mutable slice of storage in specified range. Read more
Source§

unsafe fn slice_mut( &self, range: Range<usize>, ) -> &mut [MaybeUninit<Self::Item>]

Returns a mutable slice of storage in specified range. Read more