[][src]Struct evmap::Values

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

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


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
    T: Borrow<Q>,
    Q: Eq + Hash,
    T: Eq + Hash,
    S: BuildHasher

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

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

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

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

impl<T, S> Unpin for Values<T, S> where
    S: Unpin,
    T: Unpin

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

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.