gdk

Trait FromEvent

Source
pub unsafe trait FromEvent: Sized {
    // Required methods
    fn is(ev: &Event) -> bool;
    fn from(ev: Event) -> Result<Self, Event>;
}
Expand description

A helper trait implemented by all event subtypes.

Required Methods§

Source

fn is(ev: &Event) -> bool

Source

fn from(ev: Event) -> Result<Self, Event>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§