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§
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
Required Associated Constants§
const IS_SOME_CONTAINER: bool
Required Methods§
fn as_view(&self) -> Self::View<'_>
fn to_owned(&self) -> Self::Ownedwhere
T: Clone,
fn into_owned(self) -> Self::Owned
fn into_maybe_some(self) -> Self::MaybeSome
fn maybe_map_to_owned<'a, F>(&'a self, map: F) -> Self::MaybeMapped<F::Output>
fn maybe_map_into_owned<F>(self, map: F) -> Self::MaybeMapped<F::Output>
fn to_some_or<F>(self, or: F) -> Self::Some
Object Safety§
This trait is not object safe.