Struct naia_shared::EntityActionReceiver
source · pub struct EntityActionReceiver<E: Copy + Hash + Eq> { /* private fields */ }
Implementations§
source§impl<E: Copy + Hash + Eq> EntityActionReceiver<E>
impl<E: Copy + Hash + Eq> EntityActionReceiver<E>
pub fn new() -> Self
pub fn track_hosts_redundant_remote_entity( &mut self, entity: &E, component_kinds: &Vec<ComponentKind> )
pub fn untrack_hosts_redundant_remote_entity(&mut self, entity: &E)
sourcepub fn buffer_action(
&mut self,
action_index: ActionIndex,
action: EntityAction<E>
)
pub fn buffer_action( &mut self, action_index: ActionIndex, action: EntityAction<E> )
Buffer a read EntityAction
so that it can be processed later
sourcepub fn receive_actions(&mut self) -> Vec<EntityAction<E>>
pub fn receive_actions(&mut self) -> Vec<EntityAction<E>>
Read all buffered EntityAction
inside the receiver
and process them.
Outputs the list of EntityAction
that can be executed now, buffer the rest
into each entity’s [EntityChannel
]
Auto Trait Implementations§
impl<E> RefUnwindSafe for EntityActionReceiver<E>where
E: RefUnwindSafe,
impl<E> Send for EntityActionReceiver<E>where
E: Send,
impl<E> Sync for EntityActionReceiver<E>where
E: Sync,
impl<E> Unpin for EntityActionReceiver<E>where
E: Unpin,
impl<E> UnwindSafe for EntityActionReceiver<E>where
E: UnwindSafe,
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