Struct naia_server::EntityMut
source · [−]pub struct EntityMut<'s, P: ProtocolType, E: Copy + Eq + Hash, W: WorldMutType<P, E>> { /* private fields */ }Implementations
sourceimpl<'s, P: ProtocolType, E: Copy + Eq + Hash, W: WorldMutType<P, E>> EntityMut<'s, P, E, W>
impl<'s, P: ProtocolType, E: Copy + Eq + Hash, W: WorldMutType<P, E>> EntityMut<'s, P, E, W>
pub fn id(&self) -> E
pub fn despawn(&mut self)
pub fn has_component<R: ReplicateSafe<P>>(&self) -> bool
pub fn component<R: ReplicateSafe<P>>(
&mut self
) -> Option<ReplicaMutWrapper<'_, P, R>>
pub fn insert_component<R: ReplicateSafe<P>>(
&mut self,
component_ref: R
) -> &mut Self
pub fn insert_components<R: ReplicateSafe<P>>(
&mut self,
component_refs: Vec<R>
) -> &mut Self
pub fn remove_component<R: Replicate<P>>(&mut self) -> Option<R>
pub fn has_owner(&self) -> bool
pub fn get_owner(&self) -> Option<UserKey>
pub fn set_owner(&mut self, user_key: &UserKey) -> &mut Self
pub fn disown(&mut self) -> &mut Self
pub fn enter_room(&mut self, room_key: &RoomKey) -> &mut Self
pub fn leave_room(&mut self, room_key: &RoomKey) -> &mut Self
Auto Trait Implementations
impl<'s, P, E, W> !RefUnwindSafe for EntityMut<'s, P, E, W>
impl<'s, P, E, W> Send for EntityMut<'s, P, E, W> where
E: Send,
W: Send,
impl<'s, P, E, W> Sync for EntityMut<'s, P, E, W> where
E: Sync,
W: Sync,
impl<'s, P, E, W> Unpin for EntityMut<'s, P, E, W> where
E: Unpin,
W: Unpin,
impl<'s, P, E, W> !UnwindSafe for EntityMut<'s, P, E, W>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more