Trait drone_cortexm::thr::prelude::_[][src]

pub trait _: ThrToken {
    pub fn add_fn<F, R>(self, f: F)
    where
        F: FnMut() -> FiberState<(), R> + Send + 'static,
        R: ReturnNone
, { ... }
pub fn add_fn_factory<C, F, R>(self, factory: C)
    where
        C: FnOnce() -> F + Send + 'static,
        F: FnMut() -> FiberState<(), R> + 'static,
        R: ReturnNone
, { ... }
pub fn add_once<F>(self, f: F)
    where
        F: FnOnce() + Unpin + Send + 'static
, { ... } }

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]

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]

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]

Adds a fiber that calls the closure f once.

Loading content...

Implementors

impl<T> ThrFiberClosure for T where
    T: ThrToken
[src]

Loading content...