[][src]Trait drone_core::fib::FiberRoot

pub trait FiberRoot: Send + 'static {
    fn advance(self: Pin<&mut Self>) -> bool;
}

The root fiber trait.

A variation of Fiber with Input being (), Yield - () or !, Complete - ().

Required methods

fn advance(self: Pin<&mut Self>) -> bool

Resumes the execution of this fiber.

This method will resume execution of the fiber or start execution if it hasn't already.

Return value

If true is returned then the fiber has reached a suspension point. Fibers in this state are available for resumption on a later point.

If false is returned then the fiber has completely finished. It is invalid for the fiber to be resumed again.

Panics

This method may panic if it is called after false has been returned previously.

Loading content...

Implementors

impl<F> FiberRoot for FiberOnce<F, ()> where
    F: FnOnce(),
    F: Unpin + Send + 'static, 
[src]

impl<F, R> FiberRoot for FiberFn<F, (), R> where
    F: FnMut() -> FiberState<(), R>,
    F: Send + 'static,
    R: ReturnNone, 
[src]

impl<G> FiberRoot for FiberGen<G> where
    G: Generator<Yield = (), Return = ()>,
    G: Send + 'static, 
[src]

Loading content...