pub struct Values<T, S = RandomState>(/* private fields */);
Expand description
A bag of values for a given key in the evmap.
Implementations§
Source§impl<T, S> Values<T, S>
impl<T, S> Values<T, S>
Sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Returns the number of values that can be held without reallocating.
Sourcepub fn iter(&self) -> ValuesIter<'_, T, S>
pub fn iter(&self) -> ValuesIter<'_, T, S>
An iterator visiting all elements in arbitrary order.
The iterator element type is &’a T.
Sourcepub fn get_one(&self) -> Option<&T>
pub fn get_one(&self) -> Option<&T>
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.
Trait Implementations§
Source§impl<'a, T, S> IntoIterator for &'a Values<T, S>
impl<'a, T, S> IntoIterator for &'a Values<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for Values<T, S>
impl<T, S> RefUnwindSafe for Values<T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for Values<T, S>
impl<T, S> Sync for Values<T, S>
impl<T, S> Unpin for Values<T, S>
impl<T, S> UnwindSafe for Values<T, S>
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