Trait drone_cortexm::thr::prelude::_ [−][src]
Extends ThrToken types with add_fn,
add_fn_factory, and add_once methods.
Provided methods
pub fn add_fn<F, R>(self, f: F) where
F: FnMut() -> FiberState<(), R> + Send + 'static,
R: ReturnNone, [src]
F: FnMut() -> FiberState<(), R> + Send + 'static,
R: ReturnNone,
Adds a fiber that runs the closure f until FiberState::Complete is
returned.
pub fn add_fn_factory<C, F, R>(self, factory: C) where
C: FnOnce() -> F + Send + 'static,
F: FnMut() -> FiberState<(), R> + 'static,
R: ReturnNone, [src]
C: FnOnce() -> F + Send + 'static,
F: FnMut() -> FiberState<(), R> + 'static,
R: ReturnNone,
Adds a fiber that runs the closure returned by factory until
FiberState::Complete is returned.
This method is useful for non-Send fibers.
pub fn add_once<F>(self, f: F) where
F: FnOnce() + Unpin + Send + 'static, [src]
F: FnOnce() + Unpin + Send + 'static,
Adds a fiber that calls the closure f once.
Implementors
impl<T> ThrFiberClosure for T where
T: ThrToken, [src]
T: ThrToken,