Struct xlang_abi::collection::HashSet
source · pub struct HashSet<K, H: BuildHasher = BuildHasherDefault<XLangHasher>, A: Allocator = XLangAlloc> { /* private fields */ }
Implementations
sourceimpl<K, H: BuildHasher, A: Allocator + Default> HashSet<K, H, A>
impl<K, H: BuildHasher, A: Allocator + Default> HashSet<K, H, A>
sourcepub fn with_hasher(hasher: H) -> Self
pub fn with_hasher(hasher: H) -> Self
sourceimpl<K, H: BuildHasher + Default, A: Allocator> HashSet<K, H, A>
impl<K, H: BuildHasher + Default, A: Allocator> HashSet<K, H, A>
sourceimpl<K, H: BuildHasher, A: Allocator> HashSet<K, H, A>
impl<K, H: BuildHasher, A: Allocator> HashSet<K, H, A>
sourcepub fn with_hasher_in(hasher: H, alloc: A) -> Self
pub fn with_hasher_in(hasher: H, alloc: A) -> Self
Constructs a new HashSet
with the given hasher and allocator
sourceimpl<K: Eq + Hash, H: BuildHasher, A: Allocator> HashSet<K, H, A>
impl<K: Eq + Hash, H: BuildHasher, A: Allocator> HashSet<K, H, A>
sourcepub fn contains<Q: ?Sized + Hash + Eq>(&self, val: &Q) -> boolwhere
K: Borrow<Q>,
pub fn contains<Q: ?Sized + Hash + Eq>(&self, val: &Q) -> boolwhere
K: Borrow<Q>,
Checks if self
contains the given val.
Trait Implementations
sourceimpl<K: Eq + Hash, H: BuildHasher + Default, A: Allocator + Default> Extend<K> for HashSet<K, H, A>
impl<K: Eq + Hash, H: BuildHasher + Default, A: Allocator + Default> Extend<K> for HashSet<K, H, A>
sourcefn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = K>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = K>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<K: Eq + Hash, H: BuildHasher + Default, A: Allocator + Default> FromIterator<K> for HashSet<K, H, A>
impl<K: Eq + Hash, H: BuildHasher + Default, A: Allocator + Default> FromIterator<K> for HashSet<K, H, A>
sourcefn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = K>,
fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = K>,
Creates a value from an iterator. Read more
sourceimpl<K: Eq + Hash, H: BuildHasher, A: Allocator> PartialEq<HashSet<K, H, A>> for HashSet<K, H, A>
impl<K: Eq + Hash, H: BuildHasher, A: Allocator> PartialEq<HashSet<K, H, A>> for HashSet<K, H, A>
impl<K: Eq + Hash, H: BuildHasher, A: Allocator> Eq for HashSet<K, H, A>
Auto Trait Implementations
impl<K, H, A> RefUnwindSafe for HashSet<K, H, A>where
A: RefUnwindSafe,
H: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, H, A> Send for HashSet<K, H, A>where
A: Send,
H: Send,
K: Send,
impl<K, H, A> Sync for HashSet<K, H, A>where
A: Sync,
H: Sync,
K: Sync,
impl<K, H, A> Unpin for HashSet<K, H, A>where
A: Unpin,
H: Unpin,
impl<K, H, A> UnwindSafe for HashSet<K, H, A>where
A: UnwindSafe,
H: UnwindSafe,
K: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more