pub trait PropertyList<E: Entity>: Copy + 'static {
// Required methods
fn validate() -> Result<(), IxaError>;
fn contains_properties(property_type_ids: &[TypeId]) -> bool;
fn set_values_for_entity(
&self,
entity_id: EntityId<E>,
property_store: &PropertyStore<E>,
);
// Provided method
fn contains_required_properties() -> bool { ... }
}Required Methods§
Sourcefn validate() -> Result<(), IxaError>
fn validate() -> Result<(), IxaError>
Validates that the properties are distinct. If not, returns an error describing the problematic properties.
Sourcefn contains_properties(property_type_ids: &[TypeId]) -> bool
fn contains_properties(property_type_ids: &[TypeId]) -> bool
Checks that this property list includes all properties in the given list.
Sourcefn set_values_for_entity(
&self,
entity_id: EntityId<E>,
property_store: &PropertyStore<E>,
)
fn set_values_for_entity( &self, entity_id: EntityId<E>, property_store: &PropertyStore<E>, )
Assigns the given entity the property values in self in the property_store.
This method does NOT emit property change events, as it is called upon entity creation.
Provided Methods§
Sourcefn contains_required_properties() -> bool
fn contains_required_properties() -> bool
Checks that this property list contains all required properties of the entity.
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.