pub trait Functor<'a, B>where
Self: Identity<Self::Map<'a, Self::Inner>>,
B: 'a,{
type Inner: 'a;
type Mapped<'b>: Functor<'b, B> + Identity<Self::Map<'b, B>>
where B: 'b,
'a: 'b;
type Map<'b, C>
where C: 'a,
'a: 'b;
// Required method
fn fmap<'b, F>(self, f: F) -> Self::Mapped<'b>
where F: Fn(Self::Inner) -> B + 'b,
'a: 'b;
}Expand description
A type constructed by a functor (e.g. Option<T> or Vec<T>)