Crate swimos_future

Crate swimos_future 

Source
Expand description

Futures Combinators

Additional combinators for std::future::Futures that express transformations that are not available in the futures crate.

Structs§

ExponentialStrategy
Truncated exponential retry strategy parameters.
ImmediateOrJoin
Future type for the immediate_or_join function.
ImmediateOrStart
Future type for the immediate_or_start function.
IntervalStrategy
Interval strategy parameters with either a defined number of retries to attempt or an indefinite number of retries. Sleeping for the given delay in between each request. Immediate retry strategies are backed by this.
NotifyOnBlocked
A future that will trigger a notification whenever the future it wraps returns Poll::Pending.
Race2
The type returned by the race function.
StopAfterError
A stream that runs another stream of Results until it produces an error and then terminates.

Enums§

Quantity
Wrapper around a type that can have finite and infinite values.
RetryStrategy
A strategy that determines how many times, and at what interval, a fallible process should be attempted.
SecondaryResult
Type for the result of the second future passed to immediate_or_start.
UnionFuture3
Runs any one of three possible types of future, all of which produce the same output type.
UnionFuture4
Runs any one of four possible types of future, all of which produce the same output type.

Functions§

immediate_or_join
Create a future that will poll a future and, if it does not complete immediately, will attempt to poll a second future. If the second future starts, the future will not complete until both subsidiary actions have completed. If the first future completes immediately, the second future will never be polled.
immediate_or_start
Create a future that will poll a future and, if it does not complete immediately, will star polling a second future. If the first future completes immediately, the second future will never be polled. If the second future completes before the first, both results will be returned. If the first future complets before the second, the result of the first future and the second future itself will be returned. As is must be possible to move the second future, it must be Unpin.
race
Waits for either one of two differently-typed futures to complete and then discards the other future. If both futures are ready then the left future’s output is returned.
try_last
Get the last value from a stream of results, terminating early if any member of the stream is an error.