[][src]Struct evmap::refs::Values

#[repr(transparent)]pub struct Values<T, S = RandomState>(_);

A bag of values for a given key in the evmap.

Implementations

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

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

Returns the number of values.

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

Returns true if the bag holds no values.

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

Returns the number of values that can be held without reallocating.

pub fn iter(&self) -> ValuesIter<'_, T, S>[src]

An iterator visiting all elements in arbitrary order.

The iterator element type is &'a T.

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

Returns a guarded reference to one value corresponding to the key.

This is mostly intended for use when you are working with no more than one value per key. If there are multiple values stored for this key, there are no guarantees to which element is returned.

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

Returns true if a value matching value is among the stored values.

The value may be any borrowed form of T, but Hash and Eq on the borrowed form must match those for the value type.

Trait Implementations

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

impl<T, S> Default for Values<T, S>[src]

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

type IntoIter = ValuesIter<'a, T, S>

Which kind of iterator are we turning this into?

type Item = &'a T

The type of the elements being iterated over.

Auto Trait Implementations

impl<T, S> RefUnwindSafe for Values<T, S> where
    S: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<T, S> Send for Values<T, S> where
    S: Send,
    T: Send + Sync
[src]

impl<T, S> Sync for Values<T, S> where
    S: Sync,
    T: Sync
[src]

impl<T, S> Unpin for Values<T, S> where
    S: Unpin,
    T: Unpin
[src]

impl<T, S> UnwindSafe for Values<T, S> where
    S: UnwindSafe,
    T: RefUnwindSafe + UnwindSafe
[src]

Blanket Implementations

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

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

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

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

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

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.

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.