pub trait Set: Clone {
    fn union(&self, other: &Self) -> Self;
fn intersect(&self, other: &Self) -> Self;
fn minus(&self, other: &Self) -> Self;
fn is_empty(&self) -> bool;
fn is_subset(&self, other: &Self) -> bool; }
Expand description

A very basic set trait.

Notice that we do not assume anything about the members of the set, we can’t iterate them or even retrieve them. This is because the sets might be uncountable or the elements might not be well representable.

Also notice that there is no complement method available. This is because the unit set can be different every time or completely unknown. To implement complement, use minus with an appropriate unit set.

Required methods

Implementors

Set operations.

Set operations.