pub trait EventListenerExpand {
type Event: CubeType + 'static;
// Required method
fn __expand_on_event_method(
&mut self,
scope: &Scope,
event: <Self::Event as CubeType>::ExpandType,
bus: &mut <ComptimeEventBus as CubeType>::ExpandType,
);
}Expand description
Defines a listener that is called each time an event is triggered on an event bus.
Required Associated Types§
Sourcetype Event: CubeType + 'static
type Event: CubeType + 'static
The event type triggering the EventListener::on_event callback.
Required Methods§
fn __expand_on_event_method( &mut self, scope: &Scope, event: <Self::Event as CubeType>::ExpandType, bus: &mut <ComptimeEventBus as CubeType>::ExpandType, )
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".