pub trait Functor<'a>: WeakFunctor<'a> {
// Required method
fn fmap<A: 'a + Send, B: 'a + Send>(
fa: Self::F<A>,
f: impl 'a + Send + FnOnce(A) -> B
) -> Self::F<B>;
// Provided methods
fn replace<A: 'a + Send, B: 'a + Send>(fa: Self::F<A>, b: B) -> Self::F<B> { ... }
fn void<A: 'a + Send>(fa: Self::F<A>) -> Self::F<()> { ... }
}Expand description
Rust-specific implementation of Functor, respecting move semantics.
https://hackage.haskell.org/package/base-4.18.0.0/docs/Data-Functor.html