Skip to main content

Crate type_sets

Crate type_sets 

Source
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

See the individual trait documentation for more details on each operation.

Traits§

AsTypeSet
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.

Type Aliases§

Insert
Type alias for adding a new member to a type set.
Union
Type alias for the union of two type sets.