Storage

Trait Storage 

Source
pub trait Storage: MRBIndex<usize, Output = UnsafeSyncCell<Self::Item>> {
    type Item;

    // Required methods
    fn as_ptr(&self) -> *const UnsafeSyncCell<Self::Item>;
    fn as_mut_ptr(&mut self) -> *mut UnsafeSyncCell<Self::Item>;
    fn len(&self) -> usize;
}
Expand description

Trait implemented by *Storage structs.

Required Associated Types§

Required Methods§

Source

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

Returns the underlying array as a const ptr.

Source

fn as_mut_ptr(&mut self) -> *mut UnsafeSyncCell<Self::Item>

Returns the underlying array as a mutable ptr.

Source

fn len(&self) -> usize

Returns the length of the underlying array.

Implementors§

Source§

impl<T> Storage for HeapStorage<T>

Available on crate feature alloc only.
Source§

type Item = T

Source§

impl<T, const N: usize> Storage for StackStorage<T, N>

Available on non-crate feature vmem only.
Source§

type Item = T