Skip to content

m1guelpf/epicenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Epicenter

Simple sync/async event dispatcher for Rust

crates.io download count badge docs.rs

Usage

use epicenter::{Event, AsyncDispatcher};

#[derive(Debug, Clone)]
struct ExampleEvent {}
impl Event for ExampleEvent {}

let mut dispatcher = AsyncDispatcher::new();

dispatcher.listen(|event: ExampleEvent| async move {
    // ...
}).await;

dispatcher.dispatch(&ExampleEvent {}).await?;

Refer to the documentation on docs.rs for detailed usage instructions.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Simple sync/async event dispatcher for Rust

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages