PropertyStore

Struct PropertyStore 

Source
pub struct PropertyStore<E: Entity> { /* private fields */ }
Expand description

A wrapper around a vector of property value stores.

Implementations§

Source§

impl<E: Entity> PropertyStore<E>

Source

pub fn new() -> Self

Creates a new PropertyStore.

Source

pub fn get<P: Property<E>>(&self) -> &PropertyValueStoreCore<E, P>

Fetches an immutable reference to the PropertyValueStoreCore<E, P>.

Source

pub fn get_mut<P: Property<E>>(&mut self) -> &mut PropertyValueStoreCore<E, P>

Fetches a mutable reference to the PropertyValueStoreCore<E, P>.

Source

pub fn set_property_indexed<P: Property<E>>( &mut self, index_type: PropertyIndexType, )

Sets the index type for P. Passing PropertyIndexType::Unindexed removes any existing index for P.

Note that the index might not live in the PropertyValueStore associated with P itself, as in the case of multi-properties which share a single index among all equivalent multi-properties.

Source

pub fn create_value_change_counter<PL, P>(&mut self) -> usize
where PL: PropertyList<E> + Eq + Hash, P: Property<E> + Eq + Hash,

Creates a stratified value change counter for tracked property P with strata PL.

Returns the counter ID.

Source

pub fn index_unindexed_entities_for_property_id( &mut self, context: &Context, property_id: usize, )

Updates the index of the property having the given ID for any entities that have been added to the context since the last time the index was updated.

Source

pub fn index_unindexed_entities_for_all_properties(&mut self, context: &Context)

Updates all indexed properties for any entities that have been added since the last update.

Source

pub fn get_index_set_with_hash_for_property_id( &self, property_id: usize, hash: HashValueType, ) -> IndexSetResult<'_, E>

Source

pub fn get_index_count_with_hash_for_property_id( &self, property_id: usize, hash: HashValueType, ) -> IndexCountResult

Trait Implementations§

Source§

impl<E: Entity> Default for PropertyStore<E>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<E> Freeze for PropertyStore<E>

§

impl<E> !RefUnwindSafe for PropertyStore<E>

§

impl<E> !Send for PropertyStore<E>

§

impl<E> !Sync for PropertyStore<E>

§

impl<E> Unpin for PropertyStore<E>

§

impl<E> !UnwindSafe for PropertyStore<E>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V