Skip to main content

EventListenerExpand

Trait EventListenerExpand 

Source
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§

Source

type Event: CubeType + 'static

The event type triggering the EventListener::on_event callback.

Required Methods§

Source

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".

Implementors§