State passing (state for promises is like self for items).
Complete type inference (the next promise knows the type of the previous result).
Out-of-the-box timer, UI and HTTP promises via stateless asyn mod and
stateful state.asyn() method.
Custom promise registration (add any asynchronous function you want!).
System parameters fetching
(promise asyn! functions accept the same parameters as Bevy systems do).
Nested promises (with chaining, obviously).
Combining promises with any/all for tuple/vec of promises via stateless Promise::any()
/Promise::all() methods or stateful state.any()/state.all() methods.
State mapping via with(value)/map(func) (changes state type/value over chain calls).
Result mapping via with_result(value)/map_result(func) (changes result type/value over chain calls).
Example
```rust
use bevy::prelude::;
use pecs::prelude::;
fn main() {
App::new()
.addplugins(DefaultPlugins)
.addplugin(PecsPlugin)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands, time: Res
Work in Progress
This crate is pretty young. API could and will change. App may crash. Some
promises could silently drop. Documentation is incomplete.
But. But. Examples works like a charm. And this fact gives us a lot of hope.
This means you can select the license you prefer!
This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.