pub struct IndexHashSet<I, T, S = RandomState> { /* private fields */ }
Available on crate feature
indexmap
only.Implementations§
Source§impl<I, T> IndexHashSet<I, T>
impl<I, T> IndexHashSet<I, T>
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
Source§impl<I: Idx, T: Hash + Eq, S: BuildHasher> IndexHashSet<I, T, S>
impl<I: Idx, T: Hash + Eq, S: BuildHasher> IndexHashSet<I, T, S>
pub fn with_capacity_and_hasher(cap: usize, hasher: S) -> Self
pub fn reserve(&mut self, additional: I)
pub fn reserve_len(&mut self, additional: usize)
pub fn insert(&mut self, value: T) -> bool
pub fn clear(&mut self)
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn len_idx(&self) -> I
pub fn last_idx(&self) -> Option<I>
pub fn truncate(&mut self, end: I)
pub fn truncate_len(&mut self, len: usize)
pub fn swap_remove<Q: ?Sized + Hash + Equivalent<T>>(&mut self, key: &T) -> bool
pub fn as_index_set(&self) -> &IndexSet<T, S>
pub fn as_index_set_mut(&mut self) -> &mut IndexSet<T, S>
pub fn iter_enumerated(&self) -> IdxEnumerate<I, Iter<'_, T>> ⓘ
pub fn into_iter_enumerated(self) -> IdxEnumerate<I, IntoIter<T>> ⓘ
pub fn indices(&self) -> IdxRange<I> ⓘ
pub fn capacity(&self) -> usize
pub fn iter(&self) -> Iter<'_, T>
Trait Implementations§
Source§impl<I: Clone, T: Clone, S: Clone> Clone for IndexHashSet<I, T, S>
impl<I: Clone, T: Clone, S: Clone> Clone for IndexHashSet<I, T, S>
Source§fn clone(&self) -> IndexHashSet<I, T, S>
fn clone(&self) -> IndexHashSet<I, T, S>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<I, T, S: Default> Default for IndexHashSet<I, T, S>
impl<I, T, S: Default> Default for IndexHashSet<I, T, S>
Source§impl<'de, I, T, S> Deserialize<'de> for IndexHashSet<I, T, S>where
IndexSet<T, S>: Deserialize<'de>,
impl<'de, I, T, S> Deserialize<'de> for IndexHashSet<I, T, S>where
IndexSet<T, S>: Deserialize<'de>,
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a, Idx, T, S> Extend<&'a T> for IndexHashSet<Idx, T, S>
impl<'a, Idx, T, S> Extend<&'a T> for IndexHashSet<Idx, T, S>
Source§fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn 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.
Source§fn 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
Source§impl<I, T: Hash + Eq, const N: usize> From<[T; N]> for IndexHashSet<I, T, RandomState>
impl<I, T: Hash + Eq, const N: usize> From<[T; N]> for IndexHashSet<I, T, RandomState>
Source§fn from(arr: [T; N]) -> IndexHashSet<I, T, RandomState>
fn from(arr: [T; N]) -> IndexHashSet<I, T, RandomState>
Converts to this type from the input type.
Source§impl<I, T, S> From<IndexHashSet<I, T, S>> for IndexSet<T, S>
impl<I, T, S> From<IndexHashSet<I, T, S>> for IndexSet<T, S>
Source§fn from(v: IndexHashSet<I, T, S>) -> Self
fn from(v: IndexHashSet<I, T, S>) -> Self
Converts to this type from the input type.
Source§impl<I, T, S> From<IndexSet<T, S>> for IndexHashSet<I, T, S>
impl<I, T, S> From<IndexSet<T, S>> for IndexHashSet<I, T, S>
Source§impl<I, T: Hash + Eq, S: BuildHasher + Default> FromIterator<T> for IndexHashSet<I, T, S>
impl<I, T: Hash + Eq, S: BuildHasher + Default> FromIterator<T> for IndexHashSet<I, T, S>
Source§fn from_iter<IT: IntoIterator<Item = T>>(iter: IT) -> Self
fn from_iter<IT: IntoIterator<Item = T>>(iter: IT) -> Self
Creates a value from an iterator. Read more
Source§impl<I: Idx, T, S: BuildHasher> Index<I> for IndexHashSet<I, T, S>
impl<I: Idx, T, S: BuildHasher> Index<I> for IndexHashSet<I, T, S>
Source§impl<'a, I, T, S> IntoIterator for &'a IndexHashSet<I, T, S>
impl<'a, I, T, S> IntoIterator for &'a IndexHashSet<I, T, S>
Source§impl<I, T, S> IntoIterator for IndexHashSet<I, T, S>
impl<I, T, S> IntoIterator for IndexHashSet<I, T, S>
Auto Trait Implementations§
impl<I, T, S> Freeze for IndexHashSet<I, T, S>where
S: Freeze,
impl<I, T, S> RefUnwindSafe for IndexHashSet<I, T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, T, S> Send for IndexHashSet<I, T, S>
impl<I, T, S> Sync for IndexHashSet<I, T, S>
impl<I, T, S> Unpin for IndexHashSet<I, T, S>
impl<I, T, S> UnwindSafe for IndexHashSet<I, T, S>where
S: UnwindSafe,
T: UnwindSafe,
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