pub trait Runnable: Functor {
// Required method
fn run<'a, A: 'a>(fa: <Self as Kind_cdc7cd43dac7585f>::Of<'a, A>) -> A;
}Expand description
Required Methods§
Sourcefn run<'a, A: 'a>(fa: <Self as Kind_cdc7cd43dac7585f>::Of<'a, A>) -> A
fn run<'a, A: 'a>(fa: <Self as Kind_cdc7cd43dac7585f>::Of<'a, A>) -> A
Runs the effect, producing the inner value.
§Type Signature
forall a. Runnable f => f a -> a
§Type Parameters
A: The type of the value inside the functor.
§Parameters
fa: The functor instance to run.
§Returns
The inner value.
§Examples
use fp_library::{brands::*, functions::*, types::*};
let eval = Thunk::new(|| 42);
assert_eq!(runnable_run::<ThunkBrand, _>(eval), 42);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.