pub trait Algorithm<CONTEXT, STATE, OUTPUT>: Computable<OUTPUT> + Stateful<CONTEXT, STATE> {
// Provided methods
fn run<I1: Into<CONTEXT>, I2: Into<STATE>>(
context: I1,
initial_state: I2,
) -> Cancellable<OUTPUT>
where Self: Sized + 'static { ... }
fn dyn_algorithm(self) -> DynAlgorithm<CONTEXT, STATE, OUTPUT>
where Self: Sized + 'static { ... }
}Expand description
Extends Computable trait with immutable CONTEXT and mutable STATE.
Provided Methods§
Sourcefn run<I1: Into<CONTEXT>, I2: Into<STATE>>(
context: I1,
initial_state: I2,
) -> Cancellable<OUTPUT>where
Self: Sized + 'static,
fn run<I1: Into<CONTEXT>, I2: Into<STATE>>(
context: I1,
initial_state: I2,
) -> Cancellable<OUTPUT>where
Self: Sized + 'static,
Configure and immediately execute the computation, skipping over all suspended states.
Sourcefn dyn_algorithm(self) -> DynAlgorithm<CONTEXT, STATE, OUTPUT>where
Self: Sized + 'static,
fn dyn_algorithm(self) -> DynAlgorithm<CONTEXT, STATE, OUTPUT>where
Self: Sized + 'static,
Convert to a dynamic Algorithm variant.