reorginise
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
use std::any::Any;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Opaque route key identifying a service subscription. Services name their
|
||||
/// own keys, so `common` never enumerates them and adding a service never
|
||||
/// edits this crate.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||
pub struct Service(pub &'static str);
|
||||
|
||||
/// A service event: the route key plus an erased typed payload. The app reads
|
||||
/// `key` for fan-out; the consuming module downcasts `payload`.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ServiceEvent {
|
||||
pub key: Service,
|
||||
pub payload: Arc<dyn Any + Send + Sync>,
|
||||
}
|
||||
Reference in New Issue
Block a user