rok::core::collections::set
rok::core::collections::set - Set<T>, a hash set (stdlib spec
2.9.4) over Dict<T, bool>. Iteration order is unspecified.
Structs
Set
pub struct Set<T>pub const fn new() -> Set<T>pub const fn len(self) -> usizepub const fn is_empty(self) -> boolpub const fn insert(self, x: T) -> booltruewhenxwas not there yet.pub const fn remove(self, x: T) -> booltruewhenxwas there.pub const fn contains(self, x: T) -> boolpub const fn union(self, other: Set<T>) -> Set<T>pub const fn intersection(self, other: Set<T>) -> Set<T>pub const fn difference(self, other: Set<T>) -> Set<T>pub const fn symmetric_difference(self, other: Set<T>) -> Set<T>pub const fn is_subset(self, other: Set<T>) -> boolpub const fn is_superset(self, other: Set<T>) -> boolpub const fn is_disjoint(self, other: Set<T>) -> boolpub const fn to_list(self) -> List<T>pub fn iter(self) -> KeysIter<T
Trait implementations 9
impl<T> !Sync for Set<T>impl<T: Hash> Default for Set<T>impl<T: Hash + Clone> Clone for Set<T>impl<T: Hash> IntoIterator for Set<T>impl<T: Hash> FromIterator<T> for Set<T>impl<T: Hash> PartialEq for Set<T>impl<T: Hash> Eq for Set<T>impl<T: Hash> Hash for Set<T>impl<T: Hash + Debug> Debug for Set<T>
Functions
set_literal
pub const fn set_literal<T: Hash>(items: ...T) -> Set<T>{a, b} / {a,} (refs-lang 6.5.1, 6.5.6; { a } is a block).