Trait veloren_common_net::sync::CompPacket
source · pub trait CompPacket: Clone + Debug + Send + 'static {
type Phantom: Clone + Debug + Serialize + DeserializeOwned;
// Required methods
fn apply_insert(self, entity: Entity, world: &World, force_update: bool);
fn apply_modify(self, entity: Entity, world: &World, force_update: bool);
fn apply_remove(phantom: Self::Phantom, entity: Entity, world: &World);
}
Expand description
Implemented by type that carries component data for insertion and
modification The assocatied Phantom
type only carries information about
which component type is of interest and is used to transmit deletion events
Required Associated Types§
Required Methods§
fn apply_insert(self, entity: Entity, world: &World, force_update: bool)
fn apply_modify(self, entity: Entity, world: &World, force_update: bool)
fn apply_remove(phantom: Self::Phantom, entity: Entity, world: &World)
Object Safety§
This trait is not object safe.