ebus 1.3.0

Basic Event Bus implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![allow(clippy::module_name_repetitions)]

pub(crate) mod bus;

#[cfg(feature = "async_subscriber")]
pub use async_trait::async_trait as async_subscriber;

pub type EventBus<T> = bus::EventBus<T>;

#[async_trait::async_trait]
pub trait Subscriber: Send + Sync + 'static {
    type Input;

    async fn on_event_publish(&mut self, event: &Self::Input);
}