pub struct EventRegistry {
handlers: RwLock<HashMap<String, EventHandler>>,
}
Expand description
Central event registry for dynamic registration
Fields§
§handlers: RwLock<HashMap<String, EventHandler>>
Map of event name to handler
Implementations§
Source§impl EventRegistry
impl EventRegistry
Trait Implementations§
Source§impl Default for EventRegistry
impl Default for EventRegistry
Source§impl EventRegistryClient for EventRegistry
Implementation of EventRegistryClient for EventRegistry
impl EventRegistryClient for EventRegistry
Implementation of EventRegistryClient for EventRegistry
fn register(&mut self, event_name: &str, handler: EventHandler)
Auto Trait Implementations§
impl !Freeze for EventRegistry
impl !RefUnwindSafe for EventRegistry
impl Send for EventRegistry
impl Sync for EventRegistry
impl Unpin for EventRegistry
impl !UnwindSafe for EventRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more