Struct hashlink::linked_hash_set::LinkedHashSet
source · pub struct LinkedHashSet<T, S = DefaultHashBuilder> { /* private fields */ }
Implementations§
source§impl<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>
source§impl<T, S> LinkedHashSet<T, S>
impl<T, S> LinkedHashSet<T, S>
source§impl<T, S> LinkedHashSet<T, S>
impl<T, S> LinkedHashSet<T, S>
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> ⓘ
pub fn symmetric_difference<'a>( &'a self, other: &'a LinkedHashSet<T, S>, ) -> SymmetricDifference<'a, T, S> ⓘ
pub fn intersection<'a>( &'a self, other: &'a LinkedHashSet<T, S>, ) -> Intersection<'a, T, S> ⓘ
pub fn union<'a>(&'a self, other: &'a LinkedHashSet<T, S>) -> Union<'a, T, S> ⓘ
pub fn contains<Q>(&self, value: &Q) -> bool
pub fn get<Q>(&self, value: &Q) -> Option<&T>
pub fn get_or_insert(&mut self, value: T) -> &T
pub fn get_or_insert_with<Q, F>(&mut self, value: &Q, f: F) -> &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
sourcepub fn insert(&mut self, value: T) -> bool
pub fn insert(&mut self, value: T) -> bool
Inserts the given value into the set.
If the set did not have this value present, inserts it at the back of the internal linked list and returns true, otherwise it moves the existing value to the back of the internal linked list and returns false.
sourcepub fn replace(&mut self, value: T) -> Option<T>
pub fn replace(&mut self, value: T) -> Option<T>
Adds the given value to the set, replacing the existing value.
If a previous value existed, returns the replaced value. In this case, the value’s position in the internal linked list is not changed.
pub fn remove<Q>(&mut self, value: &Q) -> bool
pub fn take<Q>(&mut self, value: &Q) -> Option<T>
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>(&mut self, value: &Q) -> bool
pub fn to_back<Q>(&mut self, value: &Q) -> bool
pub fn retain_with_order<F>(&mut self, f: F)
Trait Implementations§
source§impl<'a, 'b, T, S> BitAnd<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S>
impl<'a, 'b, T, S> BitAnd<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S>
§type Output = LinkedHashSet<T, S>
type Output = LinkedHashSet<T, S>
The resulting type after applying the
&
operator.source§fn bitand(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
fn bitand(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
Performs the
&
operation. Read moresource§impl<'a, 'b, T, S> BitOr<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S>
impl<'a, 'b, T, S> BitOr<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S>
§type Output = LinkedHashSet<T, S>
type Output = LinkedHashSet<T, S>
The resulting type after applying the
|
operator.source§fn bitor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
fn bitor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
Performs the
|
operation. Read moresource§impl<'a, 'b, T, S> BitXor<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S>
impl<'a, 'b, T, S> BitXor<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S>
§type Output = LinkedHashSet<T, S>
type Output = LinkedHashSet<T, S>
The resulting type after applying the
^
operator.source§fn bitxor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
fn bitxor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
Performs the
^
operation. Read moresource§impl<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>
source§impl<T, S> Debug for LinkedHashSet<T, S>where
T: Debug,
impl<T, S> Debug for LinkedHashSet<T, S>where
T: Debug,
source§impl<T, S> Default for LinkedHashSet<T, S>where
S: Default,
impl<T, S> Default for LinkedHashSet<T, S>where
S: Default,
source§fn default() -> LinkedHashSet<T, S>
fn default() -> LinkedHashSet<T, S>
Returns the “default value” for a type. Read more
source§impl<'a, T, S> Extend<&'a T> for LinkedHashSet<T, S>
impl<'a, T, S> Extend<&'a T> for LinkedHashSet<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<T, S> Extend<T> for LinkedHashSet<T, S>
impl<T, S> Extend<T> for LinkedHashSet<T, S>
source§fn 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
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<T, S> FromIterator<T> for LinkedHashSet<T, S>
impl<T, S> FromIterator<T> for LinkedHashSet<T, S>
source§fn 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
source§impl<T, S> Hash for LinkedHashSet<T, S>
impl<T, S> Hash for LinkedHashSet<T, S>
source§impl<'a, T, S> IntoIterator for &'a LinkedHashSet<T, S>
impl<'a, T, S> IntoIterator for &'a LinkedHashSet<T, S>
source§impl<T, S> IntoIterator for LinkedHashSet<T, S>
impl<T, S> IntoIterator for LinkedHashSet<T, S>
source§impl<T, S> PartialEq for LinkedHashSet<T, S>
impl<T, S> PartialEq for LinkedHashSet<T, S>
source§impl<'a, 'b, T, S> Sub<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S>
impl<'a, 'b, T, S> Sub<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S>
§type Output = LinkedHashSet<T, S>
type Output = LinkedHashSet<T, S>
The resulting type after applying the
-
operator.source§fn sub(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
fn sub(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>
Performs the
-
operation. Read moreimpl<T, S> Eq for LinkedHashSet<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for LinkedHashSet<T, S>where
S: Freeze,
impl<T, S> RefUnwindSafe for LinkedHashSet<T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for LinkedHashSet<T, S>
impl<T, S> Sync for LinkedHashSet<T, S>
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§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)