Struct ritelinked::LinkedHashSet[][src]

pub struct LinkedHashSet<T, S = DefaultHashBuilder> { /* fields omitted */ }

Implementations

impl<T: Hash + Eq> LinkedHashSet<T, DefaultHashBuilder>[src]

impl<T, S> LinkedHashSet<T, S>[src]

pub fn capacity(&self) -> usize[src]

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

Notable traits for Iter<'a, K>

impl<'a, K> Iterator for Iter<'a, K> type Item = &'a K;
[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn drain(&mut self) -> Drain<'_, T>

Notable traits for Drain<'a, K>

impl<'a, K> Iterator for Drain<'a, K> type Item = K;
[src]

pub fn clear(&mut self)[src]

pub fn retain<F>(&mut self, f: F) where
    F: FnMut(&T) -> bool, 
[src]

impl<T, S> LinkedHashSet<T, S> where
    T: Eq + Hash,
    S: BuildHasher
[src]

pub fn with_hasher(hasher: S) -> LinkedHashSet<T, S>[src]

pub fn with_capacity_and_hasher(
    capacity: usize,
    hasher: S
) -> LinkedHashSet<T, S>
[src]

pub fn hasher(&self) -> &S[src]

pub fn reserve(&mut self, additional: usize)[src]

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>[src]

pub fn shrink_to_fit(&mut self)[src]

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;
[src]

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;
[src]

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;
[src]

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;
[src]

pub fn contains<Q: ?Sized>(&self, value: &Q) -> bool where
    T: Borrow<Q>,
    Q: Hash + Eq
[src]

pub fn get<Q: ?Sized>(&self, value: &Q) -> Option<&T> where
    T: Borrow<Q>,
    Q: Hash + Eq
[src]

pub fn get_or_insert(&mut self, value: T) -> &T[src]

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, 
[src]

pub fn is_disjoint(&self, other: &LinkedHashSet<T, S>) -> bool[src]

pub fn is_subset(&self, other: &LinkedHashSet<T, S>) -> bool[src]

pub fn is_superset(&self, other: &LinkedHashSet<T, S>) -> bool[src]

pub fn insert(&mut self, value: T) -> bool[src]

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.

pub fn replace(&mut self, value: T) -> Option<T>[src]

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: ?Sized>(&mut self, value: &Q) -> bool where
    T: Borrow<Q>,
    Q: Hash + Eq
[src]

pub fn take<Q: ?Sized>(&mut self, value: &Q) -> Option<T> where
    T: Borrow<Q>,
    Q: Hash + Eq
[src]

pub fn front(&self) -> Option<&T>[src]

pub fn pop_front(&mut self) -> Option<T>[src]

pub fn back(&self) -> Option<&T>[src]

pub fn pop_back(&mut self) -> Option<T>[src]

pub fn to_front<Q: ?Sized>(&mut self, value: &Q) -> bool where
    T: Borrow<Q>,
    Q: Hash + Eq
[src]

pub fn to_back<Q: ?Sized>(&mut self, value: &Q) -> bool where
    T: Borrow<Q>,
    Q: Hash + Eq
[src]

Trait Implementations

impl<'a, 'b, T, S> BitAnd<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
    T: Eq + Hash + Clone,
    S: BuildHasher + Default
[src]

type Output = LinkedHashSet<T, S>

The resulting type after applying the & operator.

fn bitand(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>[src]

Performs the & operation. Read more

impl<'a, 'b, T, S> BitOr<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
    T: Eq + Hash + Clone,
    S: BuildHasher + Default
[src]

type Output = LinkedHashSet<T, S>

The resulting type after applying the | operator.

fn bitor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>[src]

Performs the | operation. Read more

impl<'a, 'b, T, S> BitXor<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
    T: Eq + Hash + Clone,
    S: BuildHasher + Default
[src]

type Output = LinkedHashSet<T, S>

The resulting type after applying the ^ operator.

fn bitxor(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>[src]

Performs the ^ operation. Read more

impl<T: Hash + Eq + Clone, S: BuildHasher + Clone> Clone for LinkedHashSet<T, S>[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T, S> Debug for LinkedHashSet<T, S> where
    T: Debug
[src]

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

Formats the value using the given formatter. Read more

impl<T, S> Default for LinkedHashSet<T, S> where
    S: Default
[src]

fn default() -> LinkedHashSet<T, S>[src]

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

impl<'a, T, S> Extend<&'a T> for LinkedHashSet<T, S> where
    T: 'a + Eq + Hash + Copy,
    S: BuildHasher
[src]

fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I)[src]

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

fn extend_one(&mut self, item: A)[src]

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

fn extend_reserve(&mut self, additional: usize)[src]

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

impl<T, S> Extend<T> for LinkedHashSet<T, S> where
    T: Eq + Hash,
    S: BuildHasher
[src]

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

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

fn extend_one(&mut self, item: A)[src]

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

fn extend_reserve(&mut self, additional: usize)[src]

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

impl<T, S> FromIterator<T> for LinkedHashSet<T, S> where
    T: Eq + Hash,
    S: BuildHasher + Default
[src]

fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> LinkedHashSet<T, S>[src]

Creates a value from an iterator. Read more

impl<T, S> Hash for LinkedHashSet<T, S> where
    T: Eq + Hash,
    S: BuildHasher
[src]

fn hash<H: Hasher>(&self, state: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<'a, T, S> IntoIterator for &'a LinkedHashSet<T, S>[src]

type Item = &'a T

The type of the elements being iterated over.

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Iter<'a, T>

Notable traits for Iter<'a, K>

impl<'a, K> Iterator for Iter<'a, K> type Item = &'a K;
[src]

Creates an iterator from a value. Read more

impl<T, S> IntoIterator for LinkedHashSet<T, S>[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?

fn into_iter(self) -> IntoIter<T>

Notable traits for IntoIter<K>

impl<K> Iterator for IntoIter<K> type Item = K;
[src]

Creates an iterator from a value. Read more

impl<T, S> PartialEq<LinkedHashSet<T, S>> for LinkedHashSet<T, S> where
    T: Eq + Hash,
    S: BuildHasher
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b, T, S> Sub<&'b LinkedHashSet<T, S>> for &'a LinkedHashSet<T, S> where
    T: Eq + Hash + Clone,
    S: BuildHasher + Default
[src]

type Output = LinkedHashSet<T, S>

The resulting type after applying the - operator.

fn sub(self, rhs: &LinkedHashSet<T, S>) -> LinkedHashSet<T, S>[src]

Performs the - operation. Read more

impl<T, S> Eq for LinkedHashSet<T, S> where
    T: Eq + Hash,
    S: BuildHasher
[src]

Auto Trait Implementations

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> CallHasher for T where
    T: Hash + ?Sized
[src]

pub default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64 where
    H: Hash + ?Sized,
    B: BuildHasher
[src]

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.