Storage

Trait Storage 

Source
pub trait Storage {
    type Storage: ?Sized;

    // Required method
    fn storage(&self) -> &Self::Storage;
}
Expand description

Get an immutable reference to the underlying storage type.

Required Associated Types§

Required Methods§

Source

fn storage(&self) -> &Self::Storage

Implementations on Foreign Types§

Source§

impl<'a, T> Storage for [T]

Source§

type Storage = [T]

Source§

fn storage(&self) -> &Self::Storage

Source§

impl<S: Storage + ?Sized> Storage for &S

Source§

type Storage = <S as Storage>::Storage

Source§

fn storage(&self) -> &Self::Storage

Source§

impl<S: Storage + ?Sized> Storage for &mut S

Source§

type Storage = <S as Storage>::Storage

Source§

fn storage(&self) -> &Self::Storage

Source§

impl<S: Storage<Storage = S>, T: Storage<Storage = T>> Storage for (S, T)

We can only provide a reference to the underlying storage of a tuple if the tuple is made up of storage type collections itself. In this case the storage is the tuple itself.

Source§

type Storage = (S, T)

Source§

fn storage(&self) -> &Self::Storage

Source§

impl<T> Storage for Vec<T>

Source§

fn storage(&self) -> &Self::Storage

Vec is a type of storage, simply return an immutable reference to self.

Source§

type Storage = Vec<T>

Source§

impl<T> Storage for Range<T>

Source§

fn storage(&self) -> &Self::Storage

A range is a type of storage, simply return an immutable reference to self.

Source§

type Storage = Range<T>

Implementors§

Source§

impl<S: Storage, I> Storage for Select<S, I>

Source§

impl<S: Storage, I> Storage for Subset<S, I>

Source§

impl<S: Storage, N> Storage for UniChunked<S, N>

Source§

impl<S: Storage, O> Storage for Chunked<S, O>

Source§

impl<S: Storage, T, I> Storage for Sparse<S, T, I>