pub struct Fiber<'a, Resume, Yield, Return> { /* private fields */ }

Implementations

Creates a new fiber which will execute func on the given stack.

This function returns a Fiber which, when resumed, will execute func to completion. When desired the func can suspend itself via Fiber::suspend.

Resumes execution of this fiber.

This function will transfer execution to the fiber and resume from where it last left off.

Returns true if the fiber finished or false if the fiber was suspended in the middle of execution.

Panics

Panics if the current thread is already executing a fiber or if this fiber has already finished.

Note that if the fiber itself panics during execution then the panic will be propagated to this caller.

Returns whether this fiber has finished executing.

Gets the stack associated with this fiber.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.