Expand description
The crate provides by-value futures that make certain patterns easier and more typesafe
There are two by-value future traits:
Future– similar to normal future, but receives self by value. You must callinto_future()to convert it tofutures::FutureStateMachine– similar toFuturebut also receives a mutable pointer ofSupplytype. Basically having both mutable state, and type-safe state machine. Converted tofutures::Futureby callingSupply::new
This crate also has it’s own Async type that contains a new state in
NotReady option.
Structs§
- Future
Wrapper - A wrapper that converts type-safe future into normal future
- Supply
- A wrapper that provides mutable state to future-like
StateMachine
Enums§
- Async
- A variant of
futures::Asyncthat carries state inNotReady
Traits§
- Future
- A type-safe future trait
- State
Machine - A type-safe future-like trait that has also borrowed mutable state