optional-future 0.1.0

Allows an Option<Future> to be used as a Future. This is handy for select! uses where one of the select options is only sometimes a valid future.
Documentation
  • Coverage
  • 88.89%
    8 out of 9 items documented0 out of 7 items with examples
  • Size
  • Source code size: 6.38 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.02 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • gamepoet/optional-future
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • gamepoet

Crates.io Documentation

optional-future is a library that allows a future that is only sometimes valid to be used in a select context. When it is None it will always be pending and thus never resolve, but when it is Some then then it will resolve when the inner future resolves.

Usage

Add this to your Cargo.toml:

[dependencies]
optional-future = "0.1"

License

Licensed under the MIT License.