Struct dag::nameset::NameSet

source ·
pub struct NameSet(_);
Expand description

A NameSet contains an immutable list of names.

It provides order-preserving iteration and set operations, and is cheaply clonable.

Implementations§

Creates an empty set.

Creates from a (short) list of known names.

Creates from a (lazy) iterator of names.

Creates from a (lazy) stream of names with hints.

Creates from a (lazy) iterator of Ids, an IdMap, and a Dag.

Creates from a (lazy) iterator of Ids and a struct with snapshot abilities.

Creates from IdSet, [IdMap] and DagAlgorithm.

Creates from IdSet and a struct with snapshot abilities.

Creates from a function that evaluates to a NameSet, and a contains fast path.

Creates from an async function that evaluates to a NameSet, and a async contains fast path.

Calculates the subset that is only in self, not in other.

Calculates the intersection of two sets.

Calculates the union of two sets.

Filter using the given async function. If filter_func returns true for a vertex, then the vertex will be taken, other it will be skipped.

Convert the set to a graph containing only the vertexes in the set. This can be slow on larger sets.

Obtain the attached dag if available.

Obtain the attached IdMap if available.

Convert the current set into a flat static set so it can be used in some fast paths. This is useful for some common sets like obsolete() that might be represented by a complex expression.

Convert this set to a static id set.

Convert this set to a static name set.

Take the first n items.

Skip the first n items.

Converts to (IdSet, IdConvert) pair in O(1). If the underlying set cannot provide such information in O(1), return None.

Useful if the callsite wants to have random access (ex. bisect) and control how to resolve in batches.

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
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
The resulting type after applying the - operator.
Performs the - operation. Read more
Iterate through the set in defined order.
Iterate through the set in the reversed order.
Number of names in this set.
The first name in the set.
The last name in the set.
Test if this set is empty.
Test if this set contains a given name.
For downcasting.
Get or set optimization hints.
Get an optional IdConvert interface to check hints.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more