Expand description
Futures Combinators
Additional combinators for std::future::Futures that express transformations that are not
available in the futures crate.
Structs§
- Exponential
Strategy - Truncated exponential retry strategy parameters.
- Immediate
OrJoin - Future type for the
immediate_or_joinfunction. - Immediate
OrStart - Future type for the
immediate_or_startfunction. - Interval
Strategy - Interval strategy parameters with either a defined number of retries to attempt or an indefinite
number of retries. Sleeping for the given
delayin between each request. Immediate retry strategies are backed by this. - Notify
OnBlocked - A future that will trigger a notification whenever the future it wraps returns
Poll::Pending. - Race2
- The type returned by the
racefunction. - Stop
After Error - 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.
- Retry
Strategy - A strategy that determines how many times, and at what interval, a fallible process should be attempted.
- Secondary
Result - Type for the result of the second future passed to
immediate_or_start. - Union
Future3 - Runs any one of three possible types of future, all of which produce the same output type.
- Union
Future4 - 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.