pub trait MapStorage<Out> {
type Input;
type Output;
// Required method
fn map_storage<F: FnOnce(Self::Input) -> Out>(self, f: F) -> Self::Output;
}Expand description
Map the storage type into another given a conversion function.
This is useful for changing storage is not just a simple Vec or slice but a combination of
independent collections.
Required Associated Types§
Required Methods§
fn map_storage<F: FnOnce(Self::Input) -> Out>(self, f: F) -> Self::Output
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<S, Out> MapStorage<Out> for Vec<S>
impl<S, Out> MapStorage<Out> for Vec<S>
Source§impl<S, T, Out> MapStorage<Out> for (S, T)
impl<S, T, Out> MapStorage<Out> for (S, T)
Source§impl<T, Out> MapStorage<Out> for &[T]
impl<T, Out> MapStorage<Out> for &[T]
Source§impl<T, Out> MapStorage<Out> for &mut [T]
impl<T, Out> MapStorage<Out> for &mut [T]
Implementors§
Source§impl<S: MapStorage<Out>, I, Out> MapStorage<Out> for Select<S, I>
impl<S: MapStorage<Out>, I, Out> MapStorage<Out> for Select<S, I>
Source§impl<S: MapStorage<Out>, I, Out> MapStorage<Out> for Subset<S, I>
impl<S: MapStorage<Out>, I, Out> MapStorage<Out> for Subset<S, I>
Source§impl<S: MapStorage<Out>, N, Out> MapStorage<Out> for UniChunked<S, N>
Map the underlying storage type.
impl<S: MapStorage<Out>, N, Out> MapStorage<Out> for UniChunked<S, N>
Map the underlying storage type.