Struct KeyHashSet

Source
pub struct KeyHashSet<T, K: Hash> { /* private fields */ }
Expand description

KeyHashSet

Trait Implementations§

Source§

impl<T, K> Debug for KeyHashSet<T, K>
where T: Clone + Debug, K: Debug + Hash,

Debug for KeyHashSet

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T, K> Extend<T> for KeyHashSet<T, K>
where T: Clone, K: Hash + Eq,

Extend for KeyHashSet

Source§

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

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

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
Source§

impl<T, K> IntoIterator for KeyHashSet<T, K>
where K: Hash,

IntoIterator for KeyHashSet

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = Map<IntoIter<K, T>, fn(_: (K, T)) -> T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T, K> KeySet<T, K> for KeyHashSet<T, K>
where T: Clone, K: Eq + Hash,

Source§

fn new(get_key: GetKeyType<T, K>) -> Self

Create KeySet
Source§

fn from_intoiter( get_key: GetKeyType<T, K>, iter: impl IntoIterator<Item = T>, ) -> Self

Source§

fn insert(&mut self, value: T)

Operate KeySet elem
Source§

fn contains(&self, value: &T) -> bool

Source§

fn remove(&mut self, value: &T) -> bool

Source§

fn take(&mut self, value: &T) -> Option<T>

Source§

fn get(&mut self, value: &T) -> Option<&T>

Source§

fn len(&self) -> usize

Source§

fn iter(&self) -> IntoIter<&T>

Source§

fn intersection<'a>(&'a self, other: &'a Self) -> Self

Operate with other KeySet
Source§

fn union<'a>(&'a self, other: &'a Self) -> Self

Source§

fn difference<'a>(&'a self, other: &'a Self) -> Self

Source§

fn symmetric_difference<'a>(&'a self, other: &'a Self) -> Self

Source§

fn is_subset(&self, other: &Self) -> bool

Check KeySet relationship
Source§

fn is_superset(&self, other: &Self) -> bool

Source§

fn is_empty(&self) -> bool

Source§

fn is_disjoint(&self, other: &Self) -> bool

Source§

impl<T, K> PartialEq for KeyHashSet<T, K>
where T: Clone, K: Eq + Hash,

PartialEq for KeyHashSet

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl<T, K> Freeze for KeyHashSet<T, K>

§

impl<T, K> RefUnwindSafe for KeyHashSet<T, K>

§

impl<T, K> Send for KeyHashSet<T, K>
where K: Send, T: Send,

§

impl<T, K> Sync for KeyHashSet<T, K>
where K: Sync, T: Sync,

§

impl<T, K> Unpin for KeyHashSet<T, K>
where K: Unpin, T: Unpin,

§

impl<T, K> UnwindSafe for KeyHashSet<T, K>
where K: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.