pub trait BoundedComonad<F: HKT>: Functor<F> {
// Required methods
fn extract<A>(fa: &F::Type<A>) -> A
where A: Clone;
fn extend<A, B, Func>(fa: &F::Type<A>, f: Func) -> F::Type<B>
where Func: FnMut(&F::Type<A>) -> B,
A: Zero + Copy + Clone,
B: Zero + Copy + Clone;
}Expand description
A Comonad that requires its contents to satisfy algebraic bounds. Essential for structures like MultiVectors that need a ‘Zero’ to represent a Physical Field Operator.
Required Methods§
fn extract<A>(fa: &F::Type<A>) -> Awhere
A: Clone,
fn extend<A, B, Func>(fa: &F::Type<A>, f: Func) -> F::Type<B>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.