Expand description
type-sets implements various compile-time set-operations on tuples.
§Basic example
assert::contains::<(i32, i16), i32>();
assert::subset::<(i32,), (i32, i64)>();
assert::superset::<(i32, i16), (i32,)>();
assert::eq::<(i32, i16), (i16, i32)>();§Operations
Contains<E>: Checks if a set contains a specific member.Subset<S>: Checks if a set is a subset of another set.Superset<S>: Checks if a set is a superset of another set.SetEqual<R>: Checks if two sets are equal.IsEmpty: Checks if a set is empty.Insert<T, E>: Adds a new member to a set.Union<T, R>: Computes the union of two sets.
See the individual trait documentation for more details on each operation.
Traits§
- AsType
Set - The main trait for representing a set of types.
- Contains
- Implemented for any set that contains a member
E. - Extend
- Trait for extending a type set with another type set.
- IsEmpty
- Indicates that a set is empty, i.e., it contains no members.
- Members
- Trait for retrieving the members of a type set as
TypeIds. - Push
- Trait for adding a new member to a type set.
- SetEqual
- Indicates that two sets are equal, i.e., they contain the same members.
- Subset
- Implemented for any set that is a subset of set
S. - Superset
- Implemented for any set that is a superset of set
S.