pub struct EntityManifest {
pub property_names: Vec<String>,
pub property_defaults: Vec<f32>,
pub alive_property: PropertyIndex,
}Expand description
Declares the homogeneous property schema for entities in a world.
Every entity in a world has the same property layout. The alive_property
is the single source of truth for liveness: stores stamp it to 1.0 on
spawn and 0.0 on despawn.
Fields§
§property_names: Vec<String>Human-readable property names.
property_defaults: Vec<f32>Default values applied to each property at spawn.
alive_property: PropertyIndexProperty index used as the alive flag.
Implementations§
Source§impl EntityManifest
impl EntityManifest
Sourcepub fn property_count(&self) -> usize
pub fn property_count(&self) -> usize
Number of properties in the manifest.
Sourcepub fn validate(&self) -> Result<(), EntityManifestError>
pub fn validate(&self) -> Result<(), EntityManifestError>
Validate the manifest shape.
Trait Implementations§
Source§impl Clone for EntityManifest
impl Clone for EntityManifest
Source§fn clone(&self) -> EntityManifest
fn clone(&self) -> EntityManifest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EntityManifest
impl Debug for EntityManifest
Source§impl PartialEq for EntityManifest
impl PartialEq for EntityManifest
impl StructuralPartialEq for EntityManifest
Auto Trait Implementations§
impl Freeze for EntityManifest
impl RefUnwindSafe for EntityManifest
impl Send for EntityManifest
impl Sync for EntityManifest
impl Unpin for EntityManifest
impl UnsafeUnpin for EntityManifest
impl UnwindSafe for EntityManifest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more