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§

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.