Trait EventType

Source
pub trait EventType: 'static {
    type Handler<S: Subsystem>;
    type Wrapper: Send + Sync + 'static;
}
Expand description

Type of an event.

Required Associated Types§

Source

type Handler<S: Subsystem>

Source

type Wrapper: Send + Sync + 'static

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.

Implementations on Foreign Types§

Source§

impl<A: 'static> EventType for fn(&A)

Source§

type Handler<S: Subsystem> = fn(_: &Arc<S>, _: &A)

Source§

type Wrapper = Box<dyn Fn(&A) + Sync + Send>

Source§

impl<A: 'static> EventType for fn(&mut A)

Source§

type Handler<S: Subsystem> = fn(_: &Arc<S>, _: &mut A)

Source§

type Wrapper = Box<dyn Fn(&mut A) + Sync + Send>

Implementors§