Struct srmap::srmap::ReadHandle [−][src]
pub struct ReadHandle<K, V, M = ()> where
K: Eq + Hash + Debug + Clone,
V: Eq + Clone,
M: 'static + Clone, { /* fields omitted */ }
A handle that may be used to read from the SRMap.
Methods
impl<K, V, M> ReadHandle<K, V, M> where
K: Eq + Hash + Debug + Clone,
V: Eq + Clone,
M: 'static + Clone,
[src]
impl<K, V, M> ReadHandle<K, V, M> where
K: Eq + Hash + Debug + Clone,
V: Eq + Clone,
M: 'static + Clone,
pub fn meta(&self) -> Option<M>
[src]
pub fn meta(&self) -> Option<M>
Get the current meta value.
pub fn get_lock(&self) -> Arc<RwLock<SRMap<K, V, M>>>
[src]
pub fn get_lock(&self) -> Arc<RwLock<SRMap<K, V, M>>>
Applies a function to the values corresponding to the key, and returns the result.
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Returns the number of non-empty keys present in the map.
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Returns true if the map contains no elements.
pub fn get_and<F, T>(&self, key: &K, then: F, uid: usize) -> Option<T> where
K: Hash + Eq,
F: FnOnce(&[V]) -> T,
[src]
pub fn get_and<F, T>(&self, key: &K, then: F, uid: usize) -> Option<T> where
K: Hash + Eq,
F: FnOnce(&[V]) -> T,
Applies a function to the values corresponding to the key, and returns the result.
pub fn meta_get_and<F, T>(
&self,
key: &K,
then: F,
uid: usize
) -> Option<(Option<T>, M)> where
K: Hash + Eq,
F: FnOnce(&[V]) -> T,
[src]
pub fn meta_get_and<F, T>(
&self,
key: &K,
then: F,
uid: usize
) -> Option<(Option<T>, M)> where
K: Hash + Eq,
F: FnOnce(&[V]) -> T,
pub fn for_each<F>(&self, f: F) where
F: FnMut(&K, &[V]),
[src]
pub fn for_each<F>(&self, f: F) where
F: FnMut(&K, &[V]),
Read all values in the map, and transform them into a new collection.
pub fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool where
K: Borrow<Q>,
Q: Hash + Eq,
[src]
pub fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool where
K: Borrow<Q>,
Q: Hash + Eq,
Trait Implementations
impl<K, V, M> Clone for ReadHandle<K, V, M> where
K: Eq + Hash + Debug + Clone,
V: Eq + Clone,
M: 'static + Clone,
[src]
impl<K, V, M> Clone for ReadHandle<K, V, M> where
K: Eq + Hash + Debug + Clone,
V: Eq + Clone,
M: 'static + Clone,