Expand description
A library for working with sets, their relationships and operations.
The main traits are:
Set- the most basic trait that all sets must implement to be able to use operations and comparisons, since most require them.
§Operations
operations::Union(∪)operations::UnionAssignoperations::Intersection(∩)operations::IntersectionAssignoperations::Difference(-)operations::DifferenceAssignoperations::DisjunctiveUnion(⊖)operations::DisjunctiveUnionAssign
§Comparisons
comparisons::SetEq(≡)comparisons::SubsetOf(⊆)comparisons::StrictSubsetOf(⊂)comparisons::SupersetOf(⊇)comparisons::StrictSupersetOf(⊃)
This library was originally designed to create a permission system, but it can be used for any kind of system that requires set-based data structures.
Modules§
- collections
- This module contains various collection types that can be used with the traits defined in this crate, such as
WildcardHashMapandWildcardBTreeMap. - comparisons
- This module contains traits for comparing sets, such as checking if two sets are equal, if one set is a subset of another, etc.
- operations
- This module contains traits for performing operations on sets, such as
Union,Intersection,Difference,DisjunctiveUnion, etc.
Macros§
- set_
eq_ partial_ eq_ impl - A helper macro to implement
SetEqfor types that also implementPartialEq, since in many cases they will be the same.
Traits§
- Set
- The most basic trait that all sets often must implement to be able to use operations and comparisons, since most require them.