Skip to main content

Event

Trait Event 

Source
pub trait Event:
    Clone
    + Send
    + Sync
    + 'static {
    const NAME: &'static str;
}
Expand description

A typed, Application-scoped event.

This compatibility contract routes through EventKey::new(NAME). New code should declare an EventKey<T> directly.

Required Associated Constants§

Source

const NAME: &'static str

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl Event for WindowFocusChanged

Source§

const NAME: &'static str = "window.focus_changed"