Trait veloren_common_net::sync::sync_ext::WorldSyncExt
source · pub trait WorldSyncExt {
// Required methods
fn register_sync_marker(&mut self);
fn register_synced<C: Component + Clone + Send + Sync>(&mut self)
where C::Storage: Default + Tracked;
fn register_tracker<C: Component + Clone + Send + Sync>(&mut self)
where C::Storage: Default + Tracked;
fn create_entity_synced(&mut self) -> EntityBuilder<'_>;
fn delete_entity_and_clear_uid_mapping(&mut self, uid: Uid);
fn uid_from_entity(&self, entity: Entity) -> Option<Uid>;
fn entity_from_uid(&self, uid: Uid) -> Option<Entity>;
fn apply_entity_package<P: CompPacket>(
&mut self,
entity_package: EntityPackage<P>,
) -> Entity;
fn apply_entity_sync_package(
&mut self,
package: EntitySyncPackage,
client_uid: Option<Uid>,
);
fn apply_comp_sync_package<P: CompPacket>(
&mut self,
package: CompSyncPackage<P>,
);
}
Required Methods§
fn register_sync_marker(&mut self)
fn register_synced<C: Component + Clone + Send + Sync>(&mut self)where
C::Storage: Default + Tracked,
fn register_tracker<C: Component + Clone + Send + Sync>(&mut self)where
C::Storage: Default + Tracked,
fn create_entity_synced(&mut self) -> EntityBuilder<'_>
fn delete_entity_and_clear_uid_mapping(&mut self, uid: Uid)
fn uid_from_entity(&self, entity: Entity) -> Option<Uid>
fn entity_from_uid(&self, uid: Uid) -> Option<Entity>
fn apply_entity_package<P: CompPacket>( &mut self, entity_package: EntityPackage<P>, ) -> Entity
fn apply_entity_sync_package( &mut self, package: EntitySyncPackage, client_uid: Option<Uid>, )
fn apply_comp_sync_package<P: CompPacket>( &mut self, package: CompSyncPackage<P>, )
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl WorldSyncExt for World
impl WorldSyncExt for World
source§fn delete_entity_and_clear_uid_mapping(&mut self, uid: Uid)
fn delete_entity_and_clear_uid_mapping(&mut self, uid: Uid)
This method should be used from the client-side when processing network messages that delete entities.
Only used on the client.
source§fn uid_from_entity(&self, entity: Entity) -> Option<Uid>
fn uid_from_entity(&self, entity: Entity) -> Option<Uid>
Get the UID of an entity
source§fn entity_from_uid(&self, uid: Uid) -> Option<Entity>
fn entity_from_uid(&self, uid: Uid) -> Option<Entity>
Get an entity from a UID