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§
- Truncated exponential retry strategy parameters.
- Future type for the
immediate_or_joinfunction. - Future type for the
immediate_or_startfunction. - 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. - A future that will trigger a notification whenever the future it wraps returns
Poll::Pending. - The type returned by the
racefunction. - A stream that runs another stream of
Results until it produces an error and then terminates.
Enums§
- Wrapper around a type that can have finite and infinite values.
- A strategy that determines how many times, and at what interval, a fallible process should be attempted.
- Type for the result of the second future passed to
immediate_or_start. - Runs any one of three possible types of future, all of which produce the same output type.
- Runs any one of four possible types of future, all of which produce the same output type.
Functions§
- 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.
- 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. - 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.
- Get the last value from a stream of results, terminating early if any member of the stream is an error.