Skip to main content

StorageComponent

Trait StorageComponent 

Source
pub trait StorageComponent {
    type Item;
    type SliceOutput<'a>
       where Self::Item: 'a;
    type SliceOutputMut<'a>
       where Self::Item: 'a;
}
Expand description

Trait implemented by storage components.

Required Associated Types§

Source

type Item

Type stored in the storage.

Source

type SliceOutput<'a> where Self::Item: 'a

Type used when working with non-mutable slices.

Source

type SliceOutputMut<'a> where Self::Item: 'a

Type used when working with non-mutable slices.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'buf, T, const N: usize> StorageComponent for StackStorage<'buf, T, N>

Source§

type Item = T

Source§

type SliceOutput<'a> = (&'a [T], &'a [T]) where T: 'a

Source§

type SliceOutputMut<'a> = (&'a mut [T], &'a mut [T]) where T: 'a

Source§

impl<T> StorageComponent for HeapStorage<T>

Available on crate feature alloc only.
Source§

type Item = T

Source§

type SliceOutput<'a> = (&'a [T], &'a [T]) where T: 'a

Source§

type SliceOutputMut<'a> = (&'a mut [T], &'a mut [T]) where T: 'a

Source§

impl<T> StorageComponent for VmemStorage<T>

Available on crate feature vmem and Unix and crate feature alloc only.
Source§

type Item = T

Source§

type SliceOutput<'a> = &'a [T] where T: 'a

Source§

type SliceOutputMut<'a> = &'a mut [T] where T: 'a