DynAlgorithm

Type Alias DynAlgorithm 

Source
pub type DynAlgorithm<CONTEXT, STATE, OUTPUT> = Box<dyn Algorithm<CONTEXT, STATE, OUTPUT>>;
Expand description

A type alias for Box<dyn Algorithm<CONTEXT, STATE, OUTPUT>>.

Aliased Type§

pub struct DynAlgorithm<CONTEXT, STATE, OUTPUT>(/* private fields */);

Trait Implementations§

Source§

impl<CONTEXT, STATE, OUTPUT> Computable<OUTPUT> for DynAlgorithm<CONTEXT, STATE, OUTPUT>

Source§

fn try_compute(&mut self) -> Completable<OUTPUT>

Try to advance this computation, returning a value once the computation is done.
Source§

fn compute_completable(&mut self) -> Completable<T>

Advance this computation until it either completes, is canceled, or becomes exhausted, skipping over all suspended states. Read more
Source§

fn compute(&mut self) -> Cancellable<T>

Advance this computation until completion, skipping over all suspended states. Read more
Source§

fn dyn_computable(self) -> DynComputable<T>
where Self: Sized + 'static,

Utility method to convert this Computable to a dynamic type.