wd_event: A async event crate for rust
This is a Rust async event Crate. Compared to the previous version, this is a brand new version, understandably a brand new crate
- Support for circular calls
- Support for call timeouts
- Support for arbitrary type passing
- Support for single and global middleware
- Event registration supports the trait, lambda and function
Getting Started
wd_event is available on crates.io. It is recommended to look there for the newest released version, as well as links to the newest builds of the docs.
At the point of the last update of this README, the latest published version could be used like this:
Add the following dependency to your Cargo manifest...
wd_event = "0.3"
Example
use ;
use Pin;
use Future;
async
attention:
ctx.nextneeds to be executed in the middleware, otherwise the execution of the event will be terminatedctx.abortcan terminate downward execution in any middleware or event- Settings on context take precedence over global Settings
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.