Skip to main content

Handle

Trait Handle 

Source
pub trait Handle {
    type EventType: Event;

    // Required method
    fn handle(&self, event: Self::EventType);
}
Expand description

Trait for an object which can subscribe to a Producer for specific events

Required Associated Types§

Required Methods§

Source

fn handle(&self, event: Self::EventType)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§