Struct weak_table::PtrWeakHashSet [] [src]

pub struct PtrWeakHashSet<T, S = RandomState>(_);

A hash set with weak elements, hashed on element pointer.

When a weak pointer expires, its mapping is lazily removed.

Methods

impl<T: WeakElement> PtrWeakHashSet<T, RandomState> where
    T::Strong: Deref
[src]

[src]

Creates an empty PtrWeakHashSet.

[src]

Creates an empty PtrWeakHashSet with the given capacity.

impl<T: WeakElement, S: BuildHasher> PtrWeakHashSet<T, S> where
    T::Strong: Deref
[src]

[src]

Creates an empty PtrWeakHashSet with the given capacity and hasher.

[src]

Creates an empty PtrWeakHashSet with the given capacity and hasher.

[src]

Returns a reference to the map's BuildHasher.

[src]

Returns the number of elements the map can hold without reallocating.

[src]

Removes all mappings whose keys have expired.

[src]

Reserves room for additional elements.

[src]

Shrinks the capacity to the minimum allowed to hold the current number of elements.

[src]

Returns an over-approximation of the number of elements.

[src]

The proportion of buckets that are used.

This is an over-approximation because of expired elements.

[src]

Removes all associations from the map.

[src]

Returns true if the map contains the specified key.

[src]

Unconditionally inserts the value, returning the old value if already present. Does not replace the key.

[src]

Removes the entry with the given key, if it exists, and returns the value.

[src]

Removes all mappings not satisfying the given predicate.

Also removes any expired mappings.

[src]

Is self a subset of other?

impl<T: WeakElement, S> PtrWeakHashSet<T, S> where
    T::Strong: Deref
[src]

Important traits for Iter<'a, T>
[src]

Gets an iterator over the keys and values.

Important traits for Drain<'a, T>
[src]

Gets a draining iterator, which removes all the values but retains the storage.

Trait Implementations

impl<T, S, S1> PartialEq<PtrWeakHashSet<T, S1>> for PtrWeakHashSet<T, S> where
    T: WeakElement,
    T::Strong: Deref,
    S: BuildHasher,
    S1: BuildHasher
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl<T: WeakElement, S: BuildHasher> Eq for PtrWeakHashSet<T, S> where
    T::Strong: Deref
[src]

impl<T: WeakElement, S: BuildHasher + Default> Default for PtrWeakHashSet<T, S> where
    T::Strong: Deref
[src]

[src]

Returns the "default value" for a type. Read more

impl<T, S> FromIterator<T::Strong> for PtrWeakHashSet<T, S> where
    T: WeakElement,
    T::Strong: Deref,
    S: BuildHasher + Default
[src]

[src]

Creates a value from an iterator. Read more

impl<T, S> Extend<T::Strong> for PtrWeakHashSet<T, S> where
    T: WeakElement,
    T::Strong: Deref,
    S: BuildHasher
[src]

[src]

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

impl<T, S> Debug for PtrWeakHashSet<T, S> where
    T: WeakElement,
    T::Strong: Debug
[src]

[src]

Formats the value using the given formatter. Read more

impl<T: WeakElement, S> IntoIterator for PtrWeakHashSet<T, S>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'a, T: WeakElement, S> IntoIterator for &'a PtrWeakHashSet<T, S> where
    T::Strong: Deref
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<T: Clone, S: Clone> Clone for PtrWeakHashSet<T, S>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T, S> Send for PtrWeakHashSet<T, S> where
    S: Send,
    T: Send

impl<T, S> Sync for PtrWeakHashSet<T, S> where
    S: Sync,
    T: Sync