Trait 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§

Source

fn register_sync_marker(&mut self)

Source

fn register_synced<C: Component + Clone + Send + Sync>(&mut self)
where C::Storage: Default + Tracked,

Source

fn register_tracker<C: Component + Clone + Send + Sync>(&mut self)
where C::Storage: Default + Tracked,

Source

fn create_entity_synced(&mut self) -> EntityBuilder<'_>

Source

fn delete_entity_and_clear_uid_mapping(&mut self, uid: Uid)

Source

fn uid_from_entity(&self, entity: Entity) -> Option<Uid>

Source

fn entity_from_uid(&self, uid: Uid) -> Option<Entity>

Source

fn apply_entity_package<P: CompPacket>( &mut self, entity_package: EntityPackage<P>, ) -> Entity

Source

fn apply_entity_sync_package( &mut self, package: EntitySyncPackage, client_uid: Option<Uid>, )

Source

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

Source§

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>

Get the UID of an entity

Source§

fn entity_from_uid(&self, uid: Uid) -> Option<Entity>

Get an entity from a UID

Source§

fn register_sync_marker(&mut self)

Source§

fn register_synced<C: Component + Clone + Send + Sync>(&mut self)
where C::Storage: Default + Tracked,

Source§

fn register_tracker<C: Component + Clone + Send + Sync>(&mut self)
where C::Storage: Default + Tracked,

Source§

fn create_entity_synced(&mut self) -> EntityBuilder<'_>

Source§

fn apply_entity_package<P: CompPacket>( &mut self, entity_package: EntityPackage<P>, ) -> Entity

Source§

fn apply_entity_sync_package( &mut self, package: EntitySyncPackage, client_uid: Option<Uid>, )

Source§

fn apply_comp_sync_package<P: CompPacket>( &mut self, package: CompSyncPackage<P>, )

Implementors§