pub struct ArraySet<K, const N: usize> { /* private fields */ }
Expand description

A set backed by an array. All possible keys must be known statically.

This set is O(1) for all operations

Implementations

Returns the number of keys that this set currently holds

Returns whether this set contains any keys

Creates a new, empty ArraySet

Determines whether a key already exists in the set

Inserts a key into the set and returns whether it was already contained in the set

Removes a key from the set and returns whether it was already contained in the set

Returns an iterator over all values that are in the set

Returns whether all possible keys are in the set

Creates a new, empty ArraySet

Panics

Panics if any of the safety requirements in the Indexable trait are wrong

Creates a new, full ArraySet

Returns the number of keys that aren’t in the set

Returns an iterator over all values that are in the set

Returns this set as a u8 (or anything that it can be turned into) with the appropriate bits representing each of the keys in this set.

Creates a new ArraySet from the given u8. Bits may be cleared to ensure this is in a valid state.

Returns this set as a u16 (or anything that it can be turned into) with the appropriate bits representing each of the keys in this set.

Creates a new ArraySet from the given u16. Bits may be cleared to ensure this is in a valid state.

Returns this set as a u32 (or anything that it can be turned into) with the appropriate bits representing each of the keys in this set.

Creates a new ArraySet from the given u32. Bits may be cleared to ensure this is in a valid state.

Returns this set as a u32 (or anything that it can be turned into) with the appropriate bits representing each of the keys in this set.

Creates a new ArraySet from the given u32. Bits may be cleared to ensure this is in a valid state.

Returns this set as a u64 (or anything that it can be turned into) with the appropriate bits representing each of the keys in this set.

Creates a new ArraySet from the given u64. Bits may be cleared to ensure this is in a valid state.

Returns this set as a u64 (or anything that it can be turned into) with the appropriate bits representing each of the keys in this set.

Creates a new ArraySet from the given u64. Bits may be cleared to ensure this is in a valid state.

Returns this set as a u64 (or anything that it can be turned into) with the appropriate bits representing each of the keys in this set.

Creates a new ArraySet from the given u64. Bits may be cleared to ensure this is in a valid state.

Returns this set as a u64 (or anything that it can be turned into) with the appropriate bits representing each of the keys in this set.

Creates a new ArraySet from the given u64. Bits may be cleared to ensure this is in a valid state.

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

Formats the value using the given formatter.

The resulting type after applying the & operator.

Performs the & operation. Read more

Performs the &= operation. Read more

The resulting type after applying the | operator.

Performs the | operation. Read more

Performs the |= operation. Read more

The resulting type after applying the ^ operator.

Performs the ^ operation. Read more

Performs the ^= operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Creates a value from an iterator. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

The resulting type after applying the ! operator.

Performs the unary ! operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. 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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.