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

The entry point for getting the latest snapshots of values written by an EventualWriter. It supports multiple styles of observation.

Implementations

Create a reader/writer pair.

Create an eventual having a final value. This is useful for creating “mock” eventuals to pass into consumers.

A helper for spawning a task which writes to an eventual. These are used extensively within the library for eventuals which update continuously over time.

Subscribe to present and future snapshots of the value in this Eventual. Generally speaking the observations of snapshots take into account the state of the reader such that:

  • The same observation is not made redundantly (same value twice in a row)
  • The observations always move forward in time
  • The final observation will always be eventually consistent with the final write.

Get a future that resolves with a snapshot of the present value of the Eventual, if any, or a future snapshot if none is available. Which snapshot is returned depends on when the Future is polled (as opposed to when the Future is created)

Get a snapshot of the current value of this Eventual, if any, without waiting.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.