Trait signal_processing::MaybeContainer

source ·
pub trait MaybeContainer<T> {
    type View<'a>: MaybeContainer<T> + 'a
       where Self: 'a;
    type Owned: MaybeContainer<T> + Sized;
    type Some: Container<T> + ?Sized;
    type MaybeSome: StaticMaybe<Self::Some> + ?Sized;
    type MaybeMapped<M>: MaybeContainer<M> + Sized;

    const IS_SOME_CONTAINER: bool;

    // Required methods
    fn as_view(&self) -> Self::View<'_>;
    fn to_owned(&self) -> Self::Owned
       where T: Clone;
    fn into_owned(self) -> Self::Owned
       where Self: Sized,
             T: Clone;
    fn into_maybe_some(self) -> Self::MaybeSome
       where Self: Sized,
             Self::Some: NotVoid;
    fn maybe_map_to_owned<'a, F>(
        &'a self,
        map: F
    ) -> Self::MaybeMapped<F::Output>
       where T: 'a,
             F: FnMut<(&'a T,)>;
    fn maybe_map_into_owned<F>(self, map: F) -> Self::MaybeMapped<F::Output>
       where T: Clone,
             Self: Sized,
             F: FnMut<(T,)>;
    fn to_some_or<F>(self, or: F) -> Self::Some
       where Self: Sized,
             F: FnOnce() -> [T; 1];
}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn as_view(&self) -> Self::View<'_>

source

fn to_owned(&self) -> Self::Owned
where T: Clone,

source

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source

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

source

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

source

fn to_some_or<F>(self, or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

§

type View<'a> = ArrayBase<ViewRepr<&'b T>, D> where T: 'a, Self: 'a

§

type Owned = ArrayBase<OwnedRepr<T>, D>

§

type Some = ArrayBase<ViewRepr<&'b T>, D>

§

type MaybeSome = ArrayBase<ViewRepr<&'b T>, D>

§

type MaybeMapped<MM> = <ArrayBase<ViewRepr<&'b T>, D> as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T> MaybeContainer<T> for &[T]

§

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

§

type Owned = Vec<T>

§

type Some = &[T]

§

type MaybeSome = &[T]

§

type MaybeMapped<MM> = <&[T] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T> MaybeContainer<T> for &[&[T]]

§

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

§

type Owned = Vec<Vec<T>>

§

type Some = &[&[T]]

§

type MaybeSome = &[&[T]]

§

type MaybeMapped<MM> = <&[&[T]] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T> MaybeContainer<T> for &[Vec<T>]

§

type View<'a> = Vec<&'a [T]> where Self: 'a

§

type Owned = Vec<Vec<T>>

§

type Some = &[Vec<T>]

§

type MaybeSome = &[Vec<T>]

§

type MaybeMapped<MM> = <&[Vec<T>] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T> MaybeContainer<T> for [T]

§

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

§

type Owned = Vec<T>

§

type Some = [T]

§

type MaybeSome = [T]

§

type MaybeMapped<MM> = <[T] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T> MaybeContainer<T> for ()

§

type View<'a> = ()

§

type Owned = ()

§

type Some = [T; 1]

§

type MaybeSome = () where Self::Some: NotVoid

§

type MaybeMapped<M> = ()

source§

const IS_SOME_CONTAINER: bool = false

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

fn maybe_map_to_owned<'a, F>(&'a self, _map: F) -> Self::MaybeMapped<F::Output>
where T: 'a, F: FnMut<(&'a T,)>,

source§

fn maybe_map_into_owned<F>(self, _map: F) -> Self::MaybeMapped<F::Output>
where T: Clone, Self: Sized, F: FnMut<(T,)>,

source§

fn to_some_or<F>(self, or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T> MaybeContainer<T> for Vec<&[T]>

§

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

§

type Owned = Vec<Vec<T>>

§

type Some = Vec<&[T]>

§

type MaybeSome = Vec<&[T]>

§

type MaybeMapped<MM> = <Vec<&[T]> as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T> MaybeContainer<T> for Vec<Vec<T>>

§

type View<'a> = Vec<&'a [T]> where Self: 'a

§

type Owned = Vec<Vec<T>>

§

type Some = Vec<Vec<T>>

§

type MaybeSome = Vec<Vec<T>>

§

type MaybeMapped<MM> = <Vec<Vec<T>> as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T> MaybeContainer<T> for Vec<T>

§

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

§

type Owned = Vec<T>

§

type Some = Vec<T>

§

type MaybeSome = Vec<T>

§

type MaybeMapped<MM> = <Vec<T> as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T> MaybeContainer<T> for [&[T]]

§

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

§

type Owned = Vec<Vec<T>>

§

type Some = [&[T]]

§

type MaybeSome = [&[T]]

§

type MaybeMapped<MM> = <[&[T]] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = Vec<&'a [T]> where Self: 'a

§

type Owned = Vec<Vec<T>>

§

type Some = [Vec<T>]

§

type MaybeSome = [Vec<T>]

§

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

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = ArrayBase<ViewRepr<&'a T>, D> where T: 'a, Self: 'a

§

type Owned = ArrayBase<OwnedRepr<T>, D>

§

type Some = ArrayBase<OwnedRepr<T>, D>

§

type MaybeSome = ArrayBase<OwnedRepr<T>, D>

§

type MaybeMapped<MM> = <ArrayBase<OwnedRepr<T>, D> as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T, const M: usize> MaybeContainer<T> for &[&[T]; M]

§

type View<'a> = &'a [&'a [T]; M] where Self: 'a

§

type Owned = [Vec<T>; M]

§

type Some = &[&[T]; M]

§

type MaybeSome = &[&[T]; M]

§

type MaybeMapped<MM> = <&[&[T]; M] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = [&'a [T]; M] where Self: 'a

§

type Owned = [Vec<T>; M]

§

type Some = &[Vec<T>; M]

§

type MaybeSome = &[Vec<T>; M]

§

type MaybeMapped<MM> = <&[Vec<T>; M] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

impl<T, const M: usize> MaybeContainer<T> for [&[T]; M]

§

type View<'a> = &'a [&'a [T]; M] where Self: 'a

§

type Owned = [Vec<T>; M]

§

type Some = [&[T]; M]

§

type MaybeSome = [&[T]; M]

§

type MaybeMapped<MM> = <[&[T]; M] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = [&'a [T]; M] where Self: 'a

§

type Owned = [Vec<T>; M]

§

type Some = [Vec<T>; M]

§

type MaybeSome = [Vec<T>; M]

§

type MaybeMapped<MM> = <[Vec<T>; M] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [T; N] where Self: 'a

§

type Owned = [T; N]

§

type Some = &[T; N]

§

type MaybeSome = &[T; N]

§

type MaybeMapped<MM> = <&[T; N] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [&'a [T; N]] where Self: 'a

§

type Owned = Vec<[T; N]>

§

type Some = &[&[T; N]]

§

type MaybeSome = &[&[T; N]]

§

type MaybeMapped<MM> = <&[&[T; N]] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [[T; N]] where Self: 'a

§

type Owned = Vec<[T; N]>

§

type Some = &[[T; N]]

§

type MaybeSome = &[[T; N]]

§

type MaybeMapped<MM> = <&[[T; N]] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [T; N] where Self: 'a

§

type Owned = [T; N]

§

type Some = [T; N]

§

type MaybeSome = [T; N]

§

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

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [&'a [T; N]] where Self: 'a

§

type Owned = Vec<[T; N]>

§

type Some = Vec<&[T; N]>

§

type MaybeSome = Vec<&[T; N]>

§

type MaybeMapped<MM> = <Vec<&[T; N]> as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = Vec<&'a [T; N]> where Self: 'a

§

type Owned = Vec<[T; N]>

§

type Some = Vec<[T; N]>

§

type MaybeSome = Vec<[T; N]>

§

type MaybeMapped<MM> = <Vec<[T; N]> as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [&'a [T; N]] where Self: 'a

§

type Owned = Vec<[T; N]>

§

type Some = [&[T; N]]

§

type MaybeSome = [&[T; N]]

§

type MaybeMapped<MM> = <[&[T; N]] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = Vec<&'a [T; N]> where Self: 'a

§

type Owned = Vec<[T; N]>

§

type Some = [[T; N]]

§

type MaybeSome = [[T; N]]

§

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

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [&'a [T; N]; M] where Self: 'a

§

type Owned = [[T; N]; M]

§

type Some = &[&[T; N]; M]

§

type MaybeSome = &[&[T; N]; M]

§

type MaybeMapped<MM> = <&[&[T; N]; M] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [[T; N]; M] where Self: 'a

§

type Owned = [[T; N]; M]

§

type Some = &[[T; N]; M]

§

type MaybeSome = &[[T; N]; M]

§

type MaybeMapped<MM> = <&[[T; N]; M] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [&'a [T; N]; M] where Self: 'a

§

type Owned = [[T; N]; M]

§

type Some = [&[T; N]; M]

§

type MaybeSome = [&[T; N]; M]

§

type MaybeMapped<MM> = <[&[T; N]; M] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

source§

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

§

type View<'a> = &'a [[T; N]; M] where Self: 'a

§

type Owned = [[T; N]; M]

§

type Some = [[T; N]; M]

§

type MaybeSome = [[T; N]; M]

§

type MaybeMapped<MM> = <[[T; N]; M] as ContainerOrSingle<T>>::Mapped<MM>

source§

const IS_SOME_CONTAINER: bool = true

source§

fn as_view(&self) -> Self::View<'_>

source§

fn to_owned(&self) -> Self::Owned
where T: Clone,

source§

fn into_owned(self) -> Self::Owned
where Self: Sized, T: Clone,

source§

fn into_maybe_some(self) -> Self::MaybeSome
where Self: Sized, Self::Some: NotVoid,

source§

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

source§

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

source§

fn to_some_or<F>(self, _or: F) -> Self::Some
where Self: Sized, F: FnOnce() -> [T; 1],

Implementors§