pub struct NameSet { /* private fields */ }Expand description
A set of Name values.
Wraps HashSet<Name> for convenient use in the elaborator.
Implementations§
Source§impl NameSet
impl NameSet
Sourcepub fn insert(&mut self, name: Name) -> bool
pub fn insert(&mut self, name: Name) -> bool
Insert a name. Returns true if it was newly inserted.
Sourcepub fn intersection(&self, other: &NameSet) -> NameSet
pub fn intersection(&self, other: &NameSet) -> NameSet
Compute the intersection with another NameSet.
Sourcepub fn difference(&self, other: &NameSet) -> NameSet
pub fn difference(&self, other: &NameSet) -> NameSet
Compute the difference self \ other.
Sourcepub fn in_namespace(&self, ns: &Name) -> NameSet
pub fn in_namespace(&self, ns: &Name) -> NameSet
Filter to names in a given namespace.
Sourcepub fn to_sorted_vec(&self) -> Vec<Name>
pub fn to_sorted_vec(&self) -> Vec<Name>
Convert to a sorted vector.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NameSet
impl RefUnwindSafe for NameSet
impl Send for NameSet
impl Sync for NameSet
impl Unpin for NameSet
impl UnsafeUnpin for NameSet
impl UnwindSafe for NameSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more