basu-0.1.7 has been yanked.
Visit the last successful build:
basu-0.1.9
Basu
A flexible event bus crate enables decoupling between different components of an application through the event-driven pattern.
Basu provides support for both asynchronous and synchronous event handling.
Example
Feature
-
Sync:
- To use sync Basu, make sure you disable
default-featuresof the basu crate onCargo.toml:[] = { = "0.1", = false, = ["sync"] }
- To use sync Basu, make sure you disable
-
Async:
- To use async Basu in your Rust project, add the following line to
Cargo.toml:[] = "0.1"
- To use async Basu in your Rust project, add the following line to
Usage:
To run the example, add the following line to Cargo.toml:
[]
= { = "1", = false, = [ "macros", "rt-multi-thread"] }
= "0.1"
Then, on your main.rs:
use ;
;
// Implement the Handle trait for your event handler structs
async
License
This project is licensed under the MIT license.