optional-future

Crates.iooptional-future
lib.rsoptional-future
version0.1.0
sourcesrc
created_at2024-07-01 04:34:31.192429
updated_at2024-07-01 04:34:31.192429
descriptionAllows an Option to be used as a Future. This is handy for select! uses where one of the select options is only sometimes a valid future.
homepage
repositoryhttps://github.com/gamepoet/optional-future
max_upload_size
id1288378
size6,249
Ben Scott (gamepoet)

documentation

README

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.

Commit count: 6

cargo fmt