The entry point for getting the latest snapshots of values written by an EventualWriter. It supports multiple styles of observation.
Pipe ceases when this is dropped
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.
Fluent style API extensions for any Eventual reader.
Indicates the type can be used with the join method. Not intended to be used directly.
Return an eventual with a starting value that then defers to source.
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).
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.
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.
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, but allows for the side effect to be async.
Prefer values from source_1 if available, otherwise use source_2.
Prevents observation of values more frequently than the provided duration. The final value is guaranteed to be observed.
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.