pub struct ReadOnlyMap<'a, K, V, S = RandomState> { /* private fields */ }Implementations§
Source§impl<'a, K, V> ReadOnlyMap<'a, K, V, RandomState>
impl<'a, K, V> ReadOnlyMap<'a, K, V, RandomState>
pub fn new( map: &'a HashMap<K, V>, filter_fn: Option<fn(&(&K, &V)) -> bool>, ) -> ReadOnlyMap<'a, K, V, RandomState>
Source§impl<'a, K, V, S> ReadOnlyMap<'a, K, V, S>
impl<'a, K, V, S> ReadOnlyMap<'a, K, V, S>
pub fn capacity(&self) -> usize
pub fn keys(&self) -> impl Iterator<Item = &K>
pub fn values(&self) -> impl Iterator<Item = &V>
pub fn iter(&self) -> impl Iterator<Item = (&K, &V)>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn hasher(&self) -> &S
Source§impl<'a, K: Eq + Hash, V, S: BuildHasher> ReadOnlyMap<'a, K, V, S>
impl<'a, K: Eq + Hash, V, S: BuildHasher> ReadOnlyMap<'a, K, V, S>
Trait Implementations§
Source§impl<'a, K: Clone, V: Clone, S: Clone> Clone for ReadOnlyMap<'a, K, V, S>
impl<'a, K: Clone, V: Clone, S: Clone> Clone for ReadOnlyMap<'a, K, V, S>
Source§fn clone(&self) -> ReadOnlyMap<'a, K, V, S>
fn clone(&self) -> ReadOnlyMap<'a, K, V, S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, K, V: Eq, Q, S: BuildHasher> Index<&Q> for ReadOnlyMap<'a, K, V, S>
impl<'a, K, V: Eq, Q, S: BuildHasher> Index<&Q> for ReadOnlyMap<'a, K, V, S>
Source§impl<'a, K: Eq + Hash, V: PartialEq, S: BuildHasher> PartialEq for ReadOnlyMap<'a, K, V, S>
impl<'a, K: Eq + Hash, V: PartialEq, S: BuildHasher> PartialEq for ReadOnlyMap<'a, K, V, S>
impl<'a, K: Eq + Hash, V: Eq, S: BuildHasher> Eq for ReadOnlyMap<'a, K, V, S>
Auto Trait Implementations§
impl<'a, K, V, S> Freeze for ReadOnlyMap<'a, K, V, S>
impl<'a, K, V, S> RefUnwindSafe for ReadOnlyMap<'a, K, V, S>
impl<'a, K, V, S> Send for ReadOnlyMap<'a, K, V, S>
impl<'a, K, V, S> Sync for ReadOnlyMap<'a, K, V, S>
impl<'a, K, V, S> Unpin for ReadOnlyMap<'a, K, V, S>
impl<'a, K, V, S> UnwindSafe for ReadOnlyMap<'a, K, V, 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.