Struct wasmtime_environ::EntitySet
source · [−]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
sourceimpl<K> EntitySet<K> where
K: EntityRef,
impl<K> EntitySet<K> where
K: EntityRef,
Shared EntitySet implementation for all value types.
sourcepub fn with_capacity(capacity: usize) -> EntitySet<K>
pub fn with_capacity(capacity: usize) -> EntitySet<K>
Creates a new empty set with the specified capacity.
sourcepub fn cardinality(&self) -> usize
pub fn cardinality(&self) -> usize
Returns the cardinality of the set. More precisely, it returns the number of calls to
insert with different key values, that have happened since the the set was most recently
cleared or created with new.
sourcepub fn keys(&self) -> Keys<K>ⓘNotable traits for Keys<K>impl<K> Iterator for Keys<K> where
K: EntityRef, type Item = K;
pub fn keys(&self) -> Keys<K>ⓘNotable traits for Keys<K>impl<K> Iterator for Keys<K> where
K: EntityRef, type Item = K;
K: EntityRef, type Item = K;
Iterate over all the keys in this set.
Trait Implementations
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more