pub trait Set<T>: Container { fn contains(&self, value: &T) -> bool; fn is_disjoint(&self, other: &Self) -> bool; fn is_subset(&self, other: &Self) -> bool; fn is_superset(&self, other: &Self) -> bool; }
A set is a group of objects which are each distinct from one another. This trait represents actions which can be performed on sets to iterate over them.
fn contains(&self, value: &T) -> bool
Return true if the set contains a value
fn is_disjoint(&self, other: &Self) -> bool
Return true if the set has no elements in common with other
.
This is equivalent to checking for an empty intersection.
fn is_subset(&self, other: &Self) -> bool
Return true if the set is a subset of another
fn is_superset(&self, other: &Self) -> bool
Return true if the set is a superset of another
HashSet<T>
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).