PropertyList

Trait PropertyList 

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

Source

fn validate() -> Result<(), IxaError>

Validates that the properties are distinct. If not, returns an error describing the problematic properties.

Source

fn contains_properties(property_type_ids: &[TypeId]) -> bool

Checks that this property list includes all properties in the given list.

Source

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§

Source

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.

Implementations on Foreign Types§

Source§

impl<E: Entity> PropertyList<E> for ()

Source§

fn validate() -> Result<(), IxaError>

Source§

fn contains_properties(property_type_ids: &[TypeId]) -> bool

Source§

fn set_values_for_entity( &self, _entity_id: EntityId<E>, _property_store: &PropertyStore<E>, )

Source§

impl<E: Entity, P0: Property<E>, P1: Property<E>> PropertyList<E> for (P0, P1)

Source§

fn validate() -> Result<(), IxaError>

Source§

fn contains_properties(property_type_ids: &[TypeId]) -> bool

Source§

fn set_values_for_entity( &self, entity_id: EntityId<E>, property_store: &PropertyStore<E>, )

Source§

impl<E: Entity, P0: Property<E>, P1: Property<E>, P2: Property<E>> PropertyList<E> for (P0, P1, P2)

Source§

fn validate() -> Result<(), IxaError>

Source§

fn contains_properties(property_type_ids: &[TypeId]) -> bool

Source§

fn set_values_for_entity( &self, entity_id: EntityId<E>, property_store: &PropertyStore<E>, )

Source§

impl<E: Entity, P0: Property<E>, P1: Property<E>, P2: Property<E>, P3: Property<E>> PropertyList<E> for (P0, P1, P2, P3)

Source§

fn validate() -> Result<(), IxaError>

Source§

fn contains_properties(property_type_ids: &[TypeId]) -> bool

Source§

fn set_values_for_entity( &self, entity_id: EntityId<E>, property_store: &PropertyStore<E>, )

Source§

impl<E: Entity, P0: Property<E>, P1: Property<E>, P2: Property<E>, P3: Property<E>, P4: Property<E>> PropertyList<E> for (P0, P1, P2, P3, P4)

Source§

fn validate() -> Result<(), IxaError>

Source§

fn contains_properties(property_type_ids: &[TypeId]) -> bool

Source§

fn set_values_for_entity( &self, entity_id: EntityId<E>, property_store: &PropertyStore<E>, )

Source§

impl<E: Entity, P: Property<E>> PropertyList<E> for (P,)

Source§

fn validate() -> Result<(), IxaError>

Source§

fn contains_properties(property_type_ids: &[TypeId]) -> bool

Source§

fn set_values_for_entity( &self, entity_id: EntityId<E>, property_store: &PropertyStore<E>, )

Implementors§