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

Shared EntitySet implementation for all value types.

Create a new empty set.

Creates a new empty set with the specified capacity.

Get the element at k if it exists.

Is this set completely empty?

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.

Remove all entries from this set.

Iterate over all the keys in this set.

Resize the set to have n entries by adding default entries as needed.

Insert the element at k.

Removes and returns the entity from the set if it exists.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.