Trait drone_core::fib::ThrFiberClosure [−][src]
Extends ThrToken
types with add_fn
,
add_fn_factory
, and add_once
methods.
Provided methods
fn add_fn<F, R>(self, f: F) where
F: FnMut() -> FiberState<(), R>,
F: Send + 'static,
R: ReturnNone,
[src]
F: FnMut() -> FiberState<(), R>,
F: Send + 'static,
R: ReturnNone,
Adds a fiber that runs the closure f
until FiberState::Complete
is
returned.
fn add_fn_factory<C, F, R>(self, factory: C) where
C: FnOnce() -> F + Send + 'static,
F: FnMut() -> FiberState<(), R>,
F: 'static,
R: ReturnNone,
[src]
C: FnOnce() -> F + Send + 'static,
F: FnMut() -> FiberState<(), R>,
F: '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.
fn add_once<F>(self, f: F) where
F: FnOnce(),
F: Unpin + Send + 'static,
[src]
F: FnOnce(),
F: Unpin + Send + 'static,
Adds a fiber that calls the closure f
once.