rok::core::collections::ordered_set
rok::core::collections::ordered_set - OrderedSet<T>, a hash set that
iterates in insertion order (stdlib spec 2.9.5), over
OrderedDict<T, bool>.
Structs
OrderedSet
pub struct OrderedSet<T>pub const fn new() -> OrderedSet<T>pub const fn from(items: List<T>) -> OrderedSet<T>The items inserted in order (later duplicates dropped).
pub const fn len(self) -> usizepub 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 iter(self) -> KeysIter<TThe members in insertion order, lazily.
pub const fn to_list(self) -> List<T>pub const fn union(self, other: OrderedSet<T>) -> OrderedSet<T>self's members, thenother's new ones.pub const fn intersection(self, other: OrderedSet<T>) -> OrderedSet<T>pub const fn difference(self, other: OrderedSet<T>) -> OrderedSet<T>pub fn symmetric_difference(self, other: OrderedSet<T>) -> OrderedSet<T>pub const fn is_subset(self, other: OrderedSet<T>) -> boolpub fn is_superset(self, other: OrderedSet<T>) -> boolpub fn is_disjoint(self, other: OrderedSet<T>) -> bool
Trait implementations 7
impl<T> !Sync for OrderedSet<T>impl<T: Hash> Default for OrderedSet<T>impl<T: Hash + Clone> Clone for OrderedSet<T>impl<T: Hash> IntoIterator for OrderedSet<T>impl<T: Hash> FromIterator<T> for OrderedSet<T>impl<T: Hash> PartialEq for OrderedSet<T>impl<T: Hash + Debug> Debug for OrderedSet<T>