pub struct UnordSet<V: Eq + Hash> {
    inner: FxHashSet<V>,
}
Expand description

This is a set collection type that tries very hard to not expose any internal iteration. This is a useful property when trying to uphold the determinism invariants imposed by the query system.

This collection type is a good choice for set-like collections the keys of which don’t have a semantic ordering.

See MCP 533 for more information.

Fields§

§inner: FxHashSet<V>

Implementations§

Returns the items of this set in stable sort order (as defined by ToStableHashKey).

The cache_sort_key parameter controls if slice::sort_by_cached_key or slice::sort_unstable_by_key will be used for sorting the vec. Use cache_sort_key when the ToStableHashKey::to_stable_hash_key implementation for V is expensive (e.g. a DefId -> DefPathHash lookup).

Returns the items of this set in stable sort order (as defined by StableOrd). This method is much more efficient than into_sorted because it does not need to transform keys to their ToStableHashKey equivalent.

Returns the items of this set in stable sort order (as defined by ToStableHashKey).

The cache_sort_key parameter controls if slice::sort_by_cached_key or slice::sort_unstable_by_key will be used for sorting the vec. Use cache_sort_key when the ToStableHashKey::to_stable_hash_key implementation for V is expensive (e.g. a DefId -> DefPathHash lookup).

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
Returns the “default value” for a type. Read more
Extends a collection with the contents of an iterator. Read more
🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Creates a value from an iterator. Read more
§

type Item

The type of the elements being iterated over.
§

type IntoIter: Iterator<Item = Self::Item>

Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes