Skip to main content

EventTarget

Trait EventTarget 

Source
pub trait EventTarget {
    // Required method
    fn register(
        &self,
        registration: &mut impl EventDispatcher,
        events: EnumSet<DomainEvent>,
        local_id: LocalId,
    );
}
Expand description

Anything that can subscribe to domain events.

Typically these are variables.

Required Methods§

Source

fn register( &self, registration: &mut impl EventDispatcher, events: EnumSet<DomainEvent>, local_id: LocalId, )

Indicate that self should be registered for the given domain events as the given local ID.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl EventTarget for i32

Source§

fn register( &self, _: &mut impl EventDispatcher, _: EnumSet<DomainEvent>, _: LocalId, )

Implementors§