Struct naia_shared::LocalWorldManager
source · pub struct LocalWorldManager<E: Copy + Eq + Hash> { /* private fields */ }
Implementations§
source§impl<E: Copy + Eq + Hash> LocalWorldManager<E>
impl<E: Copy + Eq + Hash> LocalWorldManager<E>
pub fn new(user_key: u64) -> Self
pub fn host_reserve_entity(&mut self, world_entity: &E) -> HostEntity
pub fn remove_reserved_host_entity( &mut self, world_entity: &E ) -> Option<HostEntity>
pub fn insert_remote_entity( &mut self, world_entity: &E, remote_entity: RemoteEntity )
pub fn remove_by_remote_entity(&mut self, remote_entity: &RemoteEntity) -> E
pub fn has_remote_entity(&self, remote_entity: &RemoteEntity) -> bool
pub fn has_both_host_and_remote_entity(&self, world_entity: &E) -> bool
pub fn has_world_entity(&self, world_entity: &E) -> bool
pub fn remove_redundant_host_entity(&mut self, world_entity: &E)
pub fn remove_redundant_remote_entity( &mut self, world_entity: &E ) -> RemoteEntity
pub fn get_user_key(&self) -> &u64
Trait Implementations§
source§impl<E: Copy + Eq + Hash> EntityAndLocalEntityConverter<E> for LocalWorldManager<E>
impl<E: Copy + Eq + Hash> EntityAndLocalEntityConverter<E> for LocalWorldManager<E>
fn entity_to_host_entity( &self, world_entity: &E ) -> Result<HostEntity, EntityDoesNotExistError>
fn entity_to_remote_entity( &self, world_entity: &E ) -> Result<RemoteEntity, EntityDoesNotExistError>
fn entity_to_owned_entity( &self, world_entity: &E ) -> Result<OwnedLocalEntity, EntityDoesNotExistError>
fn host_entity_to_entity( &self, host_entity: &HostEntity ) -> Result<E, EntityDoesNotExistError>
fn remote_entity_to_entity( &self, remote_entity: &RemoteEntity ) -> Result<E, EntityDoesNotExistError>
Auto Trait Implementations§
impl<E> RefUnwindSafe for LocalWorldManager<E>where
E: RefUnwindSafe,
impl<E> Send for LocalWorldManager<E>where
E: Send,
impl<E> Sync for LocalWorldManager<E>where
E: Sync,
impl<E> Unpin for LocalWorldManager<E>where
E: Unpin,
impl<E> UnwindSafe for LocalWorldManager<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