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>, )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so 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