pub struct Awaitable<Input, Output>(_);
Expand description

Awaitable guarantees that there is no spurious wakeup

Implementations

Create an uninitialized Awaitable.

Must be reset before it can be used.

Available on crate feature parking_lot only.

Create an uninitialized Awaitable.

Must be reset before it can be used.

Reset Awaitable to its initial state.

After this call, install_waker, take_input and done can be called.

Return true if the task is already done.

** install_waker must not be called after take_output is called. **

**take_input must not be called after take_output is called.

done must be only called once on one instance of Awaitable.

done must not be called after take_output is called.

Return Some(output) if the awaitable is done.

Return true if current state is Done.

Return true if current state is Consumed.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a 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.