pub struct Signal<T> { /* private fields */ }
Expand description

Synchronization primitive. Allows creating awaitable signals that may be passed between tasks. For a simple use-case where the receiver is only ever interested in the latest value of something, Signals work well. For more advanced use cases, you might want to use Channel instead..

Signals are generally declared as being a static const and then borrowed as required.

Implementations

Mark this Signal as completed.

Future that completes when this Signal has been signaled.

non-blocking method to check whether this signal has been signaled.

Trait Implementations

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.