Function drone_cortexm::fib::new_proc[][src]

pub fn new_proc<Sv, I, Y, R, F>(
    stack_size: usize,
    f: F
) -> FiberProc<Sv, I, Y, R, F> where
    Sv: Switch<Data<I, FiberState<Y, R>>>,
    F: FnMut(I, Yielder<Sv, I, Y, R>) -> R,
    F: Send + 'static,
    I: Send + 'static,
    Y: Send + 'static,
    R: Send + 'static, 

Creates a stackful fiber from the closure f.

The first argument to the closure is Fiber::Input.

This type of fiber yields on each proc_yield call on the second Yielder argument.

Panics