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§
fn map_to_owned<'a, F>(&'a self, map: F) -> Self::Mapped<F::Output>
fn map_into_owned<F>(self, map: F) -> Self::Mapped<F::Output>
fn try_map_to_owned<'a, F, O, E>(&'a self, map: F) -> Result<Self::Mapped<O>, E>
fn try_map_into_owned<F, O, E>(self, map: F) -> Result<Self::Mapped<O>, E>
fn index_get(&self, i: Self::Index) -> Option<&T>
Object Safety§
This trait is not object safe.