pub trait SliceAccess<T> {
    type Element;

    // Required methods
    fn as_slice(&self) -> &[Self::Element];
    fn as_mut_slice(&mut self) -> &mut [Self::Element];
}
Expand description

Some storages can provide slices to access the underlying data.

The underlying data may be of type T, or it may be of a type which wraps T. The associated type Element identifies what the slices will contain.

Required Associated Types§

source

type Element

The type of the underlying data elements.

Required Methods§

source

fn as_slice(&self) -> &[Self::Element]

Returns a slice of the underlying storage.

source

fn as_mut_slice(&mut self) -> &mut [Self::Element]

Returns a mutable slice of the underlying storage.

Implementors§