pub trait Monad: Applicative + Lift {
// Required method
fn bind<TIn, TOut, F>(
x: &<Self as WithTypeArg<TIn>>::Type,
f: F,
) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>,
F: Fn(&TIn) -> <Self as WithTypeArg<TOut>>::Type;
// Provided methods
fn bind_ignore<TIn, TOut>(
x: &<Self as WithTypeArg<TIn>>::Type,
y: &<Self as WithTypeArg<TOut>>::Type,
) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>,
<Self as WithTypeArg<TOut>>::Type: Clone { ... }
fn fjoin<T>(
x: &<Self as WithTypeArg<<Self as WithTypeArg<T>>::Type>>::Type,
) -> <Self as WithTypeArg<T>>::Type
where Self: WithTypeArg<T> + WithTypeArg<<Self as WithTypeArg<T>>::Type>,
<Self as WithTypeArg<T>>::Type: Clone { ... }
}
Required Methods§
fn bind<TIn, TOut, F>( x: &<Self as WithTypeArg<TIn>>::Type, f: F, ) -> <Self as WithTypeArg<TOut>>::Type
Provided Methods§
fn bind_ignore<TIn, TOut>( x: &<Self as WithTypeArg<TIn>>::Type, y: &<Self as WithTypeArg<TOut>>::Type, ) -> <Self as WithTypeArg<TOut>>::Type
fn fjoin<T>(
x: &<Self as WithTypeArg<<Self as WithTypeArg<T>>::Type>>::Type,
) -> <Self as WithTypeArg<T>>::Typewhere
Self: WithTypeArg<T> + WithTypeArg<<Self as WithTypeArg<T>>::Type>,
<Self as WithTypeArg<T>>::Type: Clone,
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.