Skip to main content

Event

Trait Event 

Source
pub trait Event:
    Debug
    + Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn name(&self) -> &'static str;
}
Expand description

Anything publishable on the EventBus.

Typically an enum per domain (PlatformEvent, GitHubEvent), so that adding a variant forces every exhaustive subscriber to acknowledge it.

Required Methods§

Source

fn name(&self) -> &'static str

Stable name used for logging and for forwarding across IPC.

It is never used for dispatch — dispatch is by type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§