pub struct ActionSender<'world> { /* private fields */ }Expand description
Sends ECS events (Actions for the Agent) to the ECS World.
A wrapper around &mut World to restrict the caller to
access only the send method in World.
Implementations§
Source§impl ActionSender<'_>
impl ActionSender<'_>
Sourcepub fn send<E: GlobalEvent>(&mut self, event: E)
pub fn send<E: GlobalEvent>(&mut self, event: E)
Send an ECS event to the ECS World.
Sourcepub fn send_to<E: TargetedEvent>(&mut self, target: EntityId, event: E)
pub fn send_to<E: TargetedEvent>(&mut self, target: EntityId, event: E)
Send an ECS event to a specific entity in the ECS World.
Auto Trait Implementations§
impl<'world> Freeze for ActionSender<'world>
impl<'world> !RefUnwindSafe for ActionSender<'world>
impl<'world> !Send for ActionSender<'world>
impl<'world> !Sync for ActionSender<'world>
impl<'world> Unpin for ActionSender<'world>
impl<'world> !UnwindSafe for ActionSender<'world>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more