pub struct StringSet { /* private fields */ }Expand description
A set of String values backed by a sorted Vec for deterministic output.
Implementations§
Source§impl StringSet
impl StringSet
Sourcepub fn insert(&mut self, item: impl Into<String>) -> bool
pub fn insert(&mut self, item: impl Into<String>) -> bool
Insert item. No-op if already present. Returns true if new.
Sourcepub fn intersection(&self, other: &StringSet) -> StringSet
pub fn intersection(&self, other: &StringSet) -> StringSet
Compute the intersection of self and other.
Sourcepub fn difference(&self, other: &StringSet) -> StringSet
pub fn difference(&self, other: &StringSet) -> StringSet
Compute the difference self \ other.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StringSet
impl RefUnwindSafe for StringSet
impl Send for StringSet
impl Sync for StringSet
impl Unpin for StringSet
impl UnsafeUnpin for StringSet
impl UnwindSafe for StringSet
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