Struct async_events::AsyncEvents[][src]

pub struct AsyncEvents<K, T> { /* fields omitted */ }
Expand description

Allows to create futures which will not complete until an associated event id is resolved. This is useful for creating futures waiting for completion on external events which are driven to completion outside of the current process.

Implementations

A future associated with a peer, which can be resolved using resolve_with. You can call this method repeatedly to create multiple observers waiting for the same event.

Attention: Do not call this method while holding a lock to leases.

Resolves all the pending futures associated with the given ids.

  • event_ids: Observers associated with these ids are resolved
  • output: The result these futures will return in their .await call

Trait Implementations

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

Performs the conversion.

Performs the conversion.

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.