Struct EntitySet
pub struct EntitySet<K>where
K: EntityRef,{ /* private fields */ }
Expand description
A set of K
for densely indexed entity references.
The EntitySet
data structure uses the dense index space to implement a set with a bitvector.
Like SecondaryMap
, an EntitySet
is used to associate secondary information with entities.
Implementations§
§impl<K> EntitySet<K>where
K: EntityRef,
impl<K> EntitySet<K>where
K: EntityRef,
Shared EntitySet
implementation for all value types.
pub fn with_capacity(capacity: usize) -> EntitySet<K>
pub fn with_capacity(capacity: usize) -> EntitySet<K>
Creates a new empty set with the specified capacity.
pub fn ensure_capacity(&mut self, capacity: usize)
pub fn ensure_capacity(&mut self, capacity: usize)
Ensure that the set has enough capacity to hold capacity
total
elements.
pub fn clear(&mut self)
pub fn clear(&mut self)
Remove all entries from this set.
Trait Implementations§
§impl<K> Extend<K> for EntitySet<K>where
K: EntityRef,
impl<K> Extend<K> for EntitySet<K>where
K: EntityRef,
§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = K>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = K>,
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl<K> Freeze for EntitySet<K>
impl<K> RefUnwindSafe for EntitySet<K>where
K: RefUnwindSafe,
impl<K> Send for EntitySet<K>where
K: Send,
impl<K> Sync for EntitySet<K>where
K: Sync,
impl<K> Unpin for EntitySet<K>where
K: Unpin,
impl<K> UnwindSafe for EntitySet<K>where
K: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)