Skip to main content

ComponentEvent

Trait ComponentEvent 

Source
pub trait ComponentEvent: Clone + 'static {
    // Required methods
    fn component(&self) -> &'static str;
    fn scope_id(&self) -> ScopeId;
}
Expand description

Component-scoped framework event.

Plugin services use this as the event bound for typed per-component hooks. The runtime keeps the matching private so authors register Hook<ForComponent<C, E>> instead of string-comparing component names.

Required Methods§

Source

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

Source

fn scope_id(&self) -> ScopeId

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§