Trait flatk::MapStorage[][src]

pub trait MapStorage<Out> {
    type Input;
    type Output;
    fn map_storage<F: FnOnce(Self::Input) -> Out>(self, f: F) -> Self::Output;
}

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.

Associated Types

Loading content...

Required methods

fn map_storage<F: FnOnce(Self::Input) -> Out>(self, f: F) -> Self::Output[src]

Loading content...

Implementations on Foreign Types

impl<T, Out> MapStorage<Out> for &[T][src]

type Input = Self

type Output = Out

impl<T, Out> MapStorage<Out> for &mut [T][src]

type Input = Self

type Output = Out

impl<S, T, Out> MapStorage<Out> for (S, T)[src]

type Input = (S, T)

type Output = Out

impl<S, Out> MapStorage<Out> for Vec<S>[src]

type Input = Self

type Output = Out

Loading content...

Implementors

impl<S: MapStorage<Out>, I, Out> MapStorage<Out> for Select<S, I>[src]

type Input = S::Input

type Output = Select<S::Output, I>

impl<S: MapStorage<Out>, I, Out> MapStorage<Out> for Subset<S, I>[src]

type Input = S::Input

type Output = Subset<S::Output, I>

impl<S: MapStorage<Out>, N, Out> MapStorage<Out> for UniChunked<S, N>[src]

Map the underlying storage type.

type Input = S::Input

type Output = UniChunked<S::Output, N>

impl<S: MapStorage<Out>, O, Out> MapStorage<Out> for Chunked<S, O>[src]

type Input = S::Input

type Output = Chunked<S::Output, O>

fn map_storage<F: FnOnce(Self::Input) -> Out>(self, f: F) -> Self::Output[src]

Map the underlying storage type.

impl<S: MapStorage<Out>, T, I, Out> MapStorage<Out> for Sparse<S, T, I>[src]

type Input = S::Input

type Output = Sparse<S::Output, T, I>

Loading content...