pub struct EntityConverterMut<'a, 'b> { /* private fields */ }Expand description
Stateful converter used when writing messages: looks up or reserves host-side entity slots on demand.
Implementations§
Source§impl<'a, 'b> EntityConverterMut<'a, 'b>
impl<'a, 'b> EntityConverterMut<'a, 'b>
Sourcepub fn new(
global_world_manager: &'a dyn GlobalWorldManagerType,
local_entity_map: &'b mut LocalEntityMap,
host_entity_generator: &'b mut HostEntityGenerator,
) -> Self
pub fn new( global_world_manager: &'a dyn GlobalWorldManagerType, local_entity_map: &'b mut LocalEntityMap, host_entity_generator: &'b mut HostEntityGenerator, ) -> Self
Creates an EntityConverterMut backed by the given world manager, entity map, and generator.
Trait Implementations§
Source§impl<'a, 'b> LocalEntityAndGlobalEntityConverter for EntityConverterMut<'a, 'b>
impl<'a, 'b> LocalEntityAndGlobalEntityConverter for EntityConverterMut<'a, 'b>
Source§fn global_entity_to_host_entity(
&self,
global_entity: &GlobalEntity,
) -> Result<HostEntity, EntityDoesNotExistError>
fn global_entity_to_host_entity( &self, global_entity: &GlobalEntity, ) -> Result<HostEntity, EntityDoesNotExistError>
Returns the
HostEntity for global_entity if one is registered, or an error otherwise.Source§fn global_entity_to_remote_entity(
&self,
global_entity: &GlobalEntity,
) -> Result<RemoteEntity, EntityDoesNotExistError>
fn global_entity_to_remote_entity( &self, global_entity: &GlobalEntity, ) -> Result<RemoteEntity, EntityDoesNotExistError>
Returns the
RemoteEntity for global_entity if one is registered, or an error otherwise.Source§fn global_entity_to_owned_entity(
&self,
global_entity: &GlobalEntity,
) -> Result<OwnedLocalEntity, EntityDoesNotExistError>
fn global_entity_to_owned_entity( &self, global_entity: &GlobalEntity, ) -> Result<OwnedLocalEntity, EntityDoesNotExistError>
Returns the
OwnedLocalEntity (host or remote) for global_entity, or an error if not found.Source§fn host_entity_to_global_entity(
&self,
host_entity: &HostEntity,
) -> Result<GlobalEntity, EntityDoesNotExistError>
fn host_entity_to_global_entity( &self, host_entity: &HostEntity, ) -> Result<GlobalEntity, EntityDoesNotExistError>
Returns the
GlobalEntity for a dynamic host_entity, or an error if not found.Source§fn static_host_entity_to_global_entity(
&self,
host_entity: &HostEntity,
) -> Result<GlobalEntity, EntityDoesNotExistError>
fn static_host_entity_to_global_entity( &self, host_entity: &HostEntity, ) -> Result<GlobalEntity, EntityDoesNotExistError>
Returns the
GlobalEntity for a static host_entity, or an error if not found.Source§fn remote_entity_to_global_entity(
&self,
remote_entity: &RemoteEntity,
) -> Result<GlobalEntity, EntityDoesNotExistError>
fn remote_entity_to_global_entity( &self, remote_entity: &RemoteEntity, ) -> Result<GlobalEntity, EntityDoesNotExistError>
Returns the
GlobalEntity for remote_entity, or an error if not found.Source§fn apply_entity_redirect(&self, entity: &OwnedLocalEntity) -> OwnedLocalEntity
fn apply_entity_redirect(&self, entity: &OwnedLocalEntity) -> OwnedLocalEntity
Returns the current redirect target for
entity, or entity unchanged if no redirect is installed.Source§fn owned_entity_to_global_entity(
&self,
owned_entity: &OwnedLocalEntity,
) -> Result<GlobalEntity, EntityDoesNotExistError>
fn owned_entity_to_global_entity( &self, owned_entity: &OwnedLocalEntity, ) -> Result<GlobalEntity, EntityDoesNotExistError>
Returns the
GlobalEntity for owned_entity, dispatching to the appropriate host or remote lookup.Source§impl<'a, 'b> LocalEntityAndGlobalEntityConverterMut for EntityConverterMut<'a, 'b>
impl<'a, 'b> LocalEntityAndGlobalEntityConverterMut for EntityConverterMut<'a, 'b>
Source§fn get_or_reserve_entity(
&mut self,
global_entity: &GlobalEntity,
) -> Result<OwnedLocalEntity, EntityDoesNotExistError>
fn get_or_reserve_entity( &mut self, global_entity: &GlobalEntity, ) -> Result<OwnedLocalEntity, EntityDoesNotExistError>
Looks up the local entity for
global_entity, reserving a new host slot if none exists yet.Auto Trait Implementations§
impl<'a, 'b> Freeze for EntityConverterMut<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for EntityConverterMut<'a, 'b>
impl<'a, 'b> !Send for EntityConverterMut<'a, 'b>
impl<'a, 'b> !Sync for EntityConverterMut<'a, 'b>
impl<'a, 'b> Unpin for EntityConverterMut<'a, 'b>
impl<'a, 'b> UnsafeUnpin for EntityConverterMut<'a, 'b>
impl<'a, 'b> !UnwindSafe for EntityConverterMut<'a, 'b>
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