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>
impl<E: Entity> PropertyStore<E>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new PropertyStore.
Sourcepub fn get<P: Property<E>>(&self) -> &PropertyValueStoreCore<E, P>
pub fn get<P: Property<E>>(&self) -> &PropertyValueStoreCore<E, P>
Fetches an immutable reference to the PropertyValueStoreCore<E, P>.
Sourcepub fn get_mut<P: Property<E>>(&mut self) -> &mut PropertyValueStoreCore<E, P>
pub fn get_mut<P: Property<E>>(&mut self) -> &mut PropertyValueStoreCore<E, P>
Fetches a mutable reference to the PropertyValueStoreCore<E, P>.
Sourcepub fn set_property_indexed<P: Property<E>>(
&mut self,
index_type: PropertyIndexType,
)
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.
Sourcepub fn index_unindexed_entities_for_property_id(
&self,
context: &Context,
property_id: usize,
)
pub fn index_unindexed_entities_for_property_id( &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. As a convenience, returns false if this property is not indexed,
true otherwise.
pub fn get_index_set_with_hash_for_property_id( &self, context: &Context, property_id: usize, hash: HashValueType, ) -> IndexSetResult<'_, E>
pub fn get_index_count_with_hash_for_property_id( &self, context: &Context, property_id: usize, hash: HashValueType, ) -> IndexCountResult
Trait Implementations§
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> 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