pub struct HashSet { /* private fields */ }Expand description
An open-addressing hash set of non-zero u64 keys. (b3HashSet)
Implementations§
Source§impl HashSet
impl HashSet
Sourcepub fn new(capacity: i32) -> HashSet
pub fn new(capacity: i32) -> HashSet
Create a set with at least capacity slots, rounded up to a power of two
(minimum 16). (b3CreateSet)
Sourcepub fn contains_key(&self, key: u64) -> bool
pub fn contains_key(&self, key: u64) -> bool
True if key is present. (b3ContainsKey)
Sourcepub fn add_key(&mut self, key: u64) -> bool
pub fn add_key(&mut self, key: u64) -> bool
Add key. Returns true if it was already present. (b3AddKey)
Sourcepub fn remove_key(&mut self, key: u64) -> bool
pub fn remove_key(&mut self, key: u64) -> bool
Remove key. Returns true if it was found. (b3RemoveKey)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HashSet
impl RefUnwindSafe for HashSet
impl Send for HashSet
impl Sync for HashSet
impl Unpin for HashSet
impl UnsafeUnpin for HashSet
impl UnwindSafe for HashSet
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