Trait armature::sender::Sender[][src]

pub trait Sender {
    type Event: IsEvent<Event = Self::Event>;
Show methods fn get_sender_component_mut(&mut self) -> &mut SenderComponent<Self::Event>;
fn get_sender_component(&self) -> &SenderComponent<Self::Event>; fn set_sender_component(
        &mut self,
        sender_component: SenderComponent<Self::Event>
    ) { ... }
fn get_sender(&self) -> UnboundedSender<Envelope<Self::Event>> { ... }
fn set_sender(&mut self, sender: UnboundedSender<Envelope<Self::Event>>) { ... }
fn clear_sender(&mut self) { ... }
fn set_associated_handler_id(&mut self, id: usize) { ... }
fn get_associated_handler_id(&self) -> Option<usize> { ... }
fn clear_associated_handler_id(&mut self) { ... }
fn publish(&self, event: Self::Event) { ... }
fn post(&self, event: Self::Event, handler_id: usize) { ... }
fn post_to_self(&self, event: Self::Event) { ... }
fn send(&self, envelope: Envelope<Self::Event>) { ... }
}
Expand description

Trait for sending events to the commutator.

Associated Types

Required methods

Get a mutable reference to the event sender component.

Get an immutable reference to the event sender component.

Provided methods

Set the event sender component.

Get the event sender

Set the event sender

Clear the event sender

Get associated event handler id, this is the id of the event handler that owns the event sender.

Get the associated event handler id.

Clear the associated event handler id.

Publish an event to all handlers.

Post an event to a specific handler.

Post an event to event handler to which the event sender is attached.

Send an envelope

Implementors