Struct AHashSet

struct AHashSet<T, S = crate::RandomState>(_)

A HashSet using RandomState to hash the items. (Requires the std feature to be enabled.)

Implementations

impl<T> AHashSet<T, RandomState>

fn new() -> Self

This crates a hashset using [RandomState::new]. See the documentation in [RandomSource] for notes about key strength.

fn with_capacity(capacity: usize) -> Self

This crates a hashset with the specified capacity using [RandomState::new]. See the documentation in [RandomSource] for notes about key strength.

impl<T, S> AHashSet<T, S>

fn with_hasher(hash_builder: S) -> Self
fn with_capacity_and_hasher(capacity: usize, hash_builder: S) -> Self

impl<'a, T, S> Extend for AHashSet<T, S>

fn extend<I: IntoIterator<Item = &'a T>>(self: &mut Self, iter: I)

impl<P, T> Receiver for AHashSet<T, S>

impl<T> Any for AHashSet<T, S>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for AHashSet<T, S>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for AHashSet<T, S>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for AHashSet<T, S>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> Default for AHashSet<T, RandomState>

fn default() -> AHashSet<T, RandomState>

Creates an empty AHashSet<T, S> with the Default value for the hasher.

impl<T> From for AHashSet<T>

fn from(item: HashSet<T, RandomState>) -> Self

impl<T> From for AHashSet<T, S>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FromIterator for AHashSet<T, RandomState>

fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> AHashSet<T>

This crates a hashset from the provided iterator using [RandomState::new]. See the documentation in [RandomSource] for notes about key strength.

impl<T> Into for AHashSet<T>

fn into(self: Self) -> HashSet<T, RandomState>

impl<T> ToOwned for AHashSet<T, S>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, N: usize> From for AHashSet<T>

fn from(arr: [T; N]) -> Self

Examples

use ahash::AHashSet;

let set1 = AHashSet::from([1, 2, 3, 4]);
let set2: AHashSet<_> = [1, 2, 3, 4].into();
assert_eq!(set1, set2);

impl<T, S> Debug for AHashSet<T, S>

fn fmt(self: &Self, fmt: &mut Formatter<'_>) -> Result

impl<T, S> Deref for AHashSet<T, S>

fn deref(self: &Self) -> &<Self as >::Target

impl<T, S> DerefMut for AHashSet<T, S>

fn deref_mut(self: &mut Self) -> &mut <Self as >::Target

impl<T, S> Eq for AHashSet<T, S>

impl<T, S> Extend for AHashSet<T, S>

fn extend<I: IntoIterator<Item = T>>(self: &mut Self, iter: I)

impl<T, S> Freeze for AHashSet<T, S>

impl<T, S> IntoIterator for AHashSet<T, S>

fn into_iter(self: Self) -> <Self as >::IntoIter

impl<T, S> PartialEq for AHashSet<T, S>

fn eq(self: &Self, other: &AHashSet<T, S>) -> bool

impl<T, S> RefUnwindSafe for AHashSet<T, S>

impl<T, S> Send for AHashSet<T, S>

impl<T, S> Sync for AHashSet<T, S>

impl<T, S> Unpin for AHashSet<T, S>

impl<T, S> UnsafeUnpin for AHashSet<T, S>

impl<T, S> UnwindSafe for AHashSet<T, S>

impl<T, U> Into for AHashSet<T, S>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for AHashSet<T, S>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for AHashSet<T, S>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<T: $crate::clone::Clone, S: $crate::clone::Clone> Clone for AHashSet<T, S>

fn clone(self: &Self) -> AHashSet<T, S>