pub trait WorldView {
// Required methods
fn snapshot(&self, entity: EntityId) -> EntitySnapshot;
fn update(
&self,
entity: EntityId,
dirty_components: &[ComponentId],
) -> Option<DeltaUpdateEntity>;
}Expand description
World view adapter used to build snapshot/update payloads.
Required Methods§
Sourcefn snapshot(&self, entity: EntityId) -> EntitySnapshot
fn snapshot(&self, entity: EntityId) -> EntitySnapshot
Build a full entity snapshot for creates.
Sourcefn update(
&self,
entity: EntityId,
dirty_components: &[ComponentId],
) -> Option<DeltaUpdateEntity>
fn update( &self, entity: EntityId, dirty_components: &[ComponentId], ) -> Option<DeltaUpdateEntity>
Build a delta update from dirty components. Return None to skip.