Struct hashlink::linked_hash_set::LinkedHashSet
source · [−]pub struct LinkedHashSet<T, S = DefaultHashBuilder> { /* private fields */ }
Implementations
sourceimpl<T: Hash + Eq> LinkedHashSet<T, DefaultHashBuilder>
impl<T: Hash + Eq> LinkedHashSet<T, DefaultHashBuilder>
pub fn new() -> LinkedHashSet<T, DefaultHashBuilder>
pub fn with_capacity(capacity: usize) -> LinkedHashSet<T, DefaultHashBuilder>
sourceimpl<T, S> LinkedHashSet<T, S>
impl<T, S> LinkedHashSet<T, S>
pub fn capacity(&self) -> usize
pub fn iter(&self) -> Iter<'_, T>ⓘNotable traits for Iter<'a, K>impl<'a, K> Iterator for Iter<'a, K> type Item = &'a K;
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn drain(&mut self) -> Drain<'_, T>ⓘNotable traits for Drain<'a, K>impl<'a, K> Iterator for Drain<'a, K> type Item = K;
pub fn clear(&mut self)
pub fn retain<F>(&mut self, f: F) where
F: FnMut(&T) -> bool,
sourceimpl<T, S> LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
impl<T, S> LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
pub fn with_hasher(hasher: S) -> LinkedHashSet<T, S>
pub fn with_capacity_and_hasher(
capacity: usize,
hasher: S
) -> LinkedHashSet<T, S>
pub fn hasher(&self) -> &S
pub fn reserve(&mut self, additional: usize)
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
pub fn shrink_to_fit(&mut self)
pub fn difference<'a>(
&'a self,
other: &'a LinkedHashSet<T, S>
) -> Difference<'a, T, S>ⓘNotable traits for Difference<'a, T, S>impl<'a, T, S> Iterator for Difference<'a, T, S> where
T: Eq + Hash,
S: BuildHasher, type Item = &'a T;
T: Eq + Hash,
S: BuildHasher, type Item = &'a T;
pub fn symmetric_difference<'a>(
&'a self,
other: &'a LinkedHashSet<T, S>
) -> SymmetricDifference<'a, T, S>ⓘNotable traits for SymmetricDifference<'a, T, S>impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S> where
T: Eq + Hash,
S: BuildHasher, type Item = &'a T;
T: Eq + Hash,
S: BuildHasher, type Item = &'a T;
pub fn intersection<'a>(
&'a self,
other: &'a LinkedHashSet<T, S>
) -> Intersection<'a, T, S>ⓘNotable traits for Intersection<'a, T, S>impl<'a, T, S> Iterator for Intersection<'a, T, S> where
T: Eq + Hash,
S: BuildHasher, type Item = &'a T;
T: Eq + Hash,
S: BuildHasher, type Item = &'a T;
pub fn union<'a>(&'a self, other: &'a LinkedHashSet<T, S>) -> Union<'a, T, S>ⓘNotable traits for Union<'a, T, S>impl<'a, T, S> Iterator for Union<'a, T, S> where
T: Eq + Hash,
S: BuildHasher, type Item = &'a T;
T: Eq + Hash,
S: BuildHasher, type Item = &'a T;
pub fn contains<Q: ?Sized>(&self, value: &Q) -> bool where
T: Borrow<Q>,
Q: Hash + Eq,
pub fn get<Q: ?Sized>(&self, value: &Q) -> Option<&T> where
T: Borrow<Q>,
Q: Hash + Eq,
pub fn get_or_insert(&mut self, value: T) -> &T
pub fn get_or_insert_with<Q: ?Sized, F>(&mut self, value: &Q, f: F) -> &T where
T: Borrow<Q>,
Q: Hash + Eq,
F: FnOnce(&Q) -> T,
pub fn is_disjoint(&self, other: &LinkedHashSet<T, S>) -> bool
pub fn is_subset(&self, other: &LinkedHashSet<T, S>) -> bool
pub fn is_superset(&self, other: &LinkedHashSet<T, S>) -> bool
pub fn insert(&mut self, value: T) -> bool
pub fn replace(&mut self, value: T) -> Option<T>
pub fn remove<Q: ?Sized>(&mut self, value: &Q) -> bool where
T: Borrow<Q>,
Q: Hash + Eq,
pub fn take<Q: ?Sized>(&mut self, value: &Q) -> Option<T> where
T: Borrow<Q>,
Q: Hash + Eq,
pub fn front(&self) -> Option<&T>
pub fn pop_front(&mut self) -> Option<T>
pub fn back(&self) -> Option<&T>
pub fn pop_back(&mut self) -> Option<T>
pub fn to_front<Q: ?Sized>(&mut self, value: &Q) -> bool where
T: Borrow<Q>,
Q: Hash + Eq,
pub fn to_back<Q: ?Sized>(&mut self, value: &Q) -> bool where
T: Borrow<Q>,
Q: Hash + Eq,
Trait Implementations
sourceimpl<'a, 'b, T, S> BitAnd<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
T: Eq + Hash + Clone,
S: BuildHasher + Default,
impl<'a, 'b, T, S> BitAnd<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
T: Eq + Hash + Clone,
S: BuildHasher + Default,
type Output = LinkedHashSet<T, S>
type Output = LinkedHashSet<T, S>
The resulting type after applying the &
operator.
sourcefn bitand(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
fn bitand(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
Performs the &
operation. Read more
sourceimpl<'a, 'b, T, S> BitOr<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
T: Eq + Hash + Clone,
S: BuildHasher + Default,
impl<'a, 'b, T, S> BitOr<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
T: Eq + Hash + Clone,
S: BuildHasher + Default,
type Output = LinkedHashSet<T, S>
type Output = LinkedHashSet<T, S>
The resulting type after applying the |
operator.
sourcefn bitor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
fn bitor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
Performs the |
operation. Read more
sourceimpl<'a, 'b, T, S> BitXor<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
T: Eq + Hash + Clone,
S: BuildHasher + Default,
impl<'a, 'b, T, S> BitXor<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
T: Eq + Hash + Clone,
S: BuildHasher + Default,
type Output = LinkedHashSet<T, S>
type Output = LinkedHashSet<T, S>
The resulting type after applying the ^
operator.
sourcefn bitxor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
fn bitxor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
Performs the ^
operation. Read more
sourceimpl<T: Hash + Eq + Clone, S: BuildHasher + Clone> Clone for LinkedHashSet<T, S>
impl<T: Hash + Eq + Clone, S: BuildHasher + Clone> Clone for LinkedHashSet<T, S>
sourceimpl<T, S> Debug for LinkedHashSet<T, S> where
T: Debug,
impl<T, S> Debug for LinkedHashSet<T, S> where
T: Debug,
sourceimpl<T, S> Default for LinkedHashSet<T, S> where
S: Default,
impl<T, S> Default for LinkedHashSet<T, S> where
S: Default,
sourcefn default() -> LinkedHashSet<T, S>
fn default() -> LinkedHashSet<T, S>
Returns the “default value” for a type. Read more
sourceimpl<'a, T, S> Extend<&'a T> for LinkedHashSet<T, S> where
T: 'a + Eq + Hash + Copy,
S: BuildHasher,
impl<'a, T, S> Extend<&'a T> for LinkedHashSet<T, S> where
T: 'a + Eq + Hash + Copy,
S: BuildHasher,
sourcefn 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
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<T, S> Extend<T> for LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
impl<T, S> Extend<T> for LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
sourcefn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
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)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<T, S> FromIterator<T> for LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher + Default,
impl<T, S> FromIterator<T> for LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher + Default,
sourcefn from_iter<I: IntoIterator<Item = T>>(iter: I) -> LinkedHashSet<T, S>
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> LinkedHashSet<T, S>
Creates a value from an iterator. Read more
sourceimpl<T, S> Hash for LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
impl<T, S> Hash for LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
sourceimpl<'a, T, S> IntoIterator for &'a LinkedHashSet<T, S>
impl<'a, T, S> IntoIterator for &'a LinkedHashSet<T, S>
sourceimpl<T, S> IntoIterator for LinkedHashSet<T, S>
impl<T, S> IntoIterator for LinkedHashSet<T, S>
sourceimpl<T, S> PartialEq<LinkedHashSet<T, S>> for LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
impl<T, S> PartialEq<LinkedHashSet<T, S>> for LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
sourceimpl<'a, 'b, T, S> Sub<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
T: Eq + Hash + Clone,
S: BuildHasher + Default,
impl<'a, 'b, T, S> Sub<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
T: Eq + Hash + Clone,
S: BuildHasher + Default,
type Output = LinkedHashSet<T, S>
type Output = LinkedHashSet<T, S>
The resulting type after applying the -
operator.
sourcefn sub(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
fn sub(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
Performs the -
operation. Read more
impl<T, S> Eq for LinkedHashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
Auto Trait Implementations
impl<T, S> RefUnwindSafe for LinkedHashSet<T, S> where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for LinkedHashSet<T, S> where
S: Send,
T: Send,
impl<T, S> Sync for LinkedHashSet<T, S> where
S: Sync,
T: Sync,
impl<T, S> Unpin for LinkedHashSet<T, S> where
S: Unpin,
impl<T, S> UnwindSafe for LinkedHashSet<T, S> where
S: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more