Crate eventuals

Crate eventuals 

Source

Re-exports§

pub use error::Closed;

Modules§

error

Structs§

Eventual
The entry point for getting the latest snapshots of values written by an EventualWriter. It supports multiple styles of observation.
EventualReader
EventualWriter
PipeHandle
Pipe ceases when this is dropped
Ptr
This type is a thin wrapper around T to enable cheap clone and comparisons. Internally it is an Arc that is compared by address instead of by the implementation of the pointed to value.

Traits§

EventualExt
Fluent style API extensions for any Eventual reader.
IntoReader
Joinable
Indicates the type can be used with the join method. Not intended to be used directly.
Selectable
TryEventualExt
Value

Functions§

flattenDeprecated
handle_errorsDeprecated
init_with
Return an eventual with a starting value that then defers to source.
join
An eventual that will only progress once all inputs are available, and then also progress with each change as they become available. For example, join(([“a”, “b, “c”], [1, 2, 3])) may observe something like [(“a”, 1), (“a”, 2), (“c”, 2), (“c”, 3)] or [(“c”, 1), (“c”, 3)]. The only snapshot that is guaranteed to be observed is (“c”, 3).
map
Applies an operation to each observed snapshot from the source. For example: map([1, 2, 3, 4, 5], |v| v+1) may produce something like [2, 6] or [3, 4, 6]. In this case, 6 is the only value guaranteed to be observed eventually.
map_with_retry
Ensure that a fallible map operation will succeed eventually. For example given map_with_retry([“url_1”, “url_2”], fallibly_get_data, sleep) may produce [“data_1”, “data_2”] or just [“data_2”]. The difference between map_with_retry and something like map(source, retry(fallibly_get_data, on_err)) is that the former supports ‘moving on’ to “url_2” even if “url_1” is in a retry state, whereas the latter would have to complete one item fully before progressing. It is because of this distinction that map_with_retry is allowed to retry forever instead of giving up after a set number of attempts.
pipe
Produce a side effect with the latest snapshots as they become available. The caller must not drop the returned PipeHandle until it is no longer desirable to produce the side effect.
pipe_async
Similar to pipe, but allows for the side effect to be async. See also: pipe
prefer
Prefer values from source_1 if available, otherwise use source_2.
retry
selectDeprecated
throttle
Prevents observation of values more frequently than the provided duration. The final value is guaranteed to be observed.
timer
Periodically writes a new value of the time elapsed. No guarantee is made about frequency or the value written except that at least “interval” time has passed since producing the last snapshot.