Struct AutoSet

Source
pub struct AutoSet<K, H = BuildHasherDefault<FxHasher>, const I: usize = 0> { /* private fields */ }

Implementations§

Source§

impl<K> AutoSet<K, BuildHasherDefault<FxHasher>, 0>

Source

pub const fn new() -> Self

Source

pub fn with_capacity(capacity: usize) -> Self

Source§

impl<K, H: BuildHasher, const I: usize> AutoSet<K, H, I>

Source

pub const fn with_hasher() -> Self

Source

pub fn with_capacity_and_hasher(capacity: usize, hasher: H) -> Self

Source

pub fn clear(&mut self)

Source§

impl<K: Hash + Eq, H: BuildHasher + Default, const I: usize> AutoSet<K, H, I>

Source

pub fn insert(&mut self, key: K) -> bool

Source

pub fn remove(&mut self, key: &K) -> bool

Source

pub fn extend(&mut self, iter: impl IntoIterator<Item = K>)

Source

pub fn shrink_to_fit(&mut self)

Source

pub fn contains(&self, key: &K) -> bool

Source§

impl<K, H, const I: usize> AutoSet<K, H, I>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn iter(&self) -> Iter<'_, K>

Trait Implementations§

Source§

impl<K: Clone, H: Clone, const I: usize> Clone for AutoSet<K, H, I>

Source§

fn clone(&self) -> AutoSet<K, H, I>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K: Debug, H, const I: usize> Debug for AutoSet<K, H, I>

Source§

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

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

impl<K, H, const I: usize> Default for AutoSet<K, H, I>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de, K, H, const I: usize> Deserialize<'de> for AutoSet<K, H, I>
where K: Deserialize<'de> + Hash + Eq, H: BuildHasher + Default,

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<K, H, const N: usize, const I: usize> From<[K; N]> for AutoSet<K, H, I>
where K: Hash + Eq, H: BuildHasher + Default,

Source§

fn from(array: [K; N]) -> Self

Converts to this type from the input type.
Source§

impl<K, H, const I: usize> FromIterator<K> for AutoSet<K, H, I>
where K: Hash + Eq, H: BuildHasher + Default,

Source§

fn from_iter<T: IntoIterator<Item = K>>(iter: T) -> Self

Creates a value from an iterator. Read more
Source§

impl<'a, K, H, const I: usize> IntoIterator for &'a AutoSet<K, H, I>

Source§

type Item = &'a K

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, K>

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<K, H, const I: usize> IntoIterator for AutoSet<K, H, I>

Source§

type Item = K

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<K, I>

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<K: Eq + Hash, H: BuildHasher, const I: usize> PartialEq for AutoSet<K, H, I>

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

impl<K, H, const I: usize> Serialize for AutoSet<K, H, I>
where K: Serialize, H: BuildHasher,

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl<K, H, const I: usize> ShrinkToFit for AutoSet<K, H, I>
where K: Eq + Hash, H: BuildHasher + Default,

Source§

fn shrink_to_fit(&mut self)

Source§

impl<K: Eq + Hash, H: BuildHasher, const I: usize> Eq for AutoSet<K, H, I>

Auto Trait Implementations§

§

impl<K, H, const I: usize> Freeze for AutoSet<K, H, I>
where K: Freeze,

§

impl<K, H, const I: usize> RefUnwindSafe for AutoSet<K, H, I>

§

impl<K, H, const I: usize> Send for AutoSet<K, H, I>
where K: Send, H: Send,

§

impl<K, H, const I: usize> Sync for AutoSet<K, H, I>
where H: Sync, K: Sync,

§

impl<K, H, const I: usize> Unpin for AutoSet<K, H, I>
where K: Unpin,

§

impl<K, H, const I: usize> UnwindSafe for AutoSet<K, H, I>

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> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,