Trait drone_core::fib::RootFiber[][src]

pub trait RootFiber: '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[src]

Resumes execution of this fiber, returning false if subsequent resumptions are not allowed.

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

Return value

If false is returned then the fiber has reached a suspension point. Fibers in this state can be resumed again.

If true is returned then the fiber has completely finished. It is not allowed for the fiber to be resumed again.

Panics

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

Loading content...

Implementors

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

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

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

Loading content...