pub trait Bind<A, B>: Lift<A, B> {
// Required method
fn bind<F>(self, f: F) -> <Self as Lift<A, B>>::Target1
where F: Fn(A) -> <Self as Lift<A, B>>::Target1;
}Expand description
Bind lets you chain computations together.
It takes a function Fn(A) -> M<B> and applies it to the A inside M<A>.
You can think of this as a callback function for when the value of A is
ready to be processed, returning the next computation in the sequence.
Required Methods§
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.