pub trait ContainerOrSingle<T> {
    type Index;
    type Mapped<M>: ContainerOrSingle<M> + Sized;

    // Required methods
    fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
       where T: 'a,
             F: FnMut<(&'a T,)>;
    fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
       where T: Clone,
             Self: Sized,
             F: FnMut<(T,)>;
    fn try_map_to_owned<'a, F, O, E>(
        &'a self,
        map: F
    ) -> Result<Self::Mapped<O>, E>
       where T: 'a,
             F: FnMut(&'a T) -> Result<O, E>;
    fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
       where T: Clone,
             Self: Sized,
             F: FnMut(T) -> Result<O, E>;
    fn index_get(&self, i: Self::Index) -> Option<&T>;
}

Required Associated Types§

Required Methods§

source

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source

fn index_get(&self, i: Self::Index) -> Option<&T>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'b, 'c, T> ContainerOrSingle<T> for &'b [&'c [T]]

§

type Mapped<MM> = <<&'b [&'c [T]] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, 'c, T, const M: usize> ContainerOrSingle<T> for &'b [&'c [T]; M]

§

type Mapped<MM> = <<&'b [&'c [T]; M] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, 'c, T, const N: usize> ContainerOrSingle<T> for &'b [&'c [T; N]]

§

type Mapped<MM> = <<&'b [&'c [T; N]] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, 'c, T, const N: usize, const M: usize> ContainerOrSingle<T> for &'b [&'c [T; N]; M]

§

type Mapped<MM> = <<&'b [&'c [T; N]; M] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T> ContainerOrSingle<T> for &'b [Vec<T>]

§

type Mapped<MM> = <<&'b [Vec<T>] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T> ContainerOrSingle<T> for Vec<&'b [T]>

§

type Mapped<MM> = <<Vec<&'b [T]> as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T> ContainerOrSingle<T> for [&'b [T]]

§

type Mapped<MM> = <<[&'b [T]] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T, const M: usize> ContainerOrSingle<T> for &'b [Vec<T>; M]

§

type Mapped<MM> = [Vec<MM>; M]

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T, const M: usize> ContainerOrSingle<T> for [&'b [T]; M]

§

type Mapped<MM> = <<[&'b [T]; M] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T, const N: usize> ContainerOrSingle<T> for &'b [T; N]

§

type Mapped<M> = <<&'b [T; N] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<M>

§

type Index = usize

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T, const N: usize> ContainerOrSingle<T> for &'b [[T; N]]

§

type Mapped<MM> = <<&'b [[T; N]] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T, const N: usize> ContainerOrSingle<T> for Vec<&'b [T; N]>

§

type Mapped<MM> = <<Vec<&'b [T; N]> as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T, const N: usize> ContainerOrSingle<T> for [&'b [T; N]]

§

type Mapped<MM> = <<[&'b [T; N]] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T, const N: usize, const M: usize> ContainerOrSingle<T> for &'b [[T; N]; M]

§

type Mapped<MM> = <<&'b [[T; N]; M] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'b, T, const N: usize, const M: usize> ContainerOrSingle<T> for [&'b [T; N]; M]

§

type Mapped<MM> = <<[&'b [T; N]; M] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'c, T> ContainerOrSingle<T> for &'c [T]

§

type Mapped<M> = <<&'c [T] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<M>

§

type Index = usize

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<'c, T, D> ContainerOrSingle<T> for ArrayView<'c, T, D>
where D: Dimension + NotVoid, <D as Dimension>::Pattern: NdIndex<D>,

§

type Mapped<M> = ArrayBase<OwnedRepr<M>, D>

§

type Index = <D as Dimension>::Pattern

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T> ContainerOrSingle<T> for [T]

§

type Mapped<M> = <<[T] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<M>

§

type Index = usize

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T> ContainerOrSingle<T> for Vec<Vec<T>>

§

type Mapped<MM> = Vec<Vec<MM>>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T> ContainerOrSingle<T> for Vec<T>

§

type Mapped<M> = Vec<M>

§

type Index = usize

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T> ContainerOrSingle<T> for [Vec<T>]

§

type Mapped<MM> = <<[Vec<T>] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T, D> ContainerOrSingle<T> for ArrayBase<OwnedRepr<T>, D>
where D: Dimension + NotVoid, <D as Dimension>::Pattern: NdIndex<D>,

§

type Mapped<M> = ArrayBase<OwnedRepr<M>, D>

§

type Index = <D as Dimension>::Pattern

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T, const M: usize> ContainerOrSingle<T> for [Vec<T>; M]

§

type Mapped<MM> = [Vec<MM>; M]

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T, const N: usize> ContainerOrSingle<T> for [T; N]

§

type Mapped<M> = [M; N]

§

type Index = usize

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T, const N: usize> ContainerOrSingle<T> for Vec<[T; N]>

§

type Mapped<MM> = Vec<[MM; N]>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T, const N: usize> ContainerOrSingle<T> for [[T; N]]

§

type Mapped<MM> = <<[[T; N]] as MaybeContainer<T>>::Owned as ContainerOrSingle<T>>::Mapped<MM>

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

source§

impl<T, const N: usize, const M: usize> ContainerOrSingle<T> for [[T; N]; M]

§

type Mapped<MM> = [[MM; N]; M]

§

type Index = (usize, usize)

source§

fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
where T: 'a, F: FnMut(&'a T) -> Result<O, E>,

source§

fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
where T: Clone, Self: Sized, F: FnMut(T) -> Result<O, E>,

source§

fn index_get(&self, i: Self::Index) -> Option<&T>

Implementors§

source§

impl<T> ContainerOrSingle<T> for T

§

type Index = ()

§

type Mapped<M> = M