Struct eventuals::Eventual [−][src]
pub struct Eventual<T> { /* fields omitted */ }
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
Auto Trait Implementations
impl<T> !RefUnwindSafe for Eventual<T>
impl<T> !UnwindSafe for Eventual<T>
Blanket Implementations
Mutably borrows from an owned value. Read more