Struct horde::sync_table::Read [−][src]
pub struct Read<'a, K, V, S = DefaultHashBuilder> { /* fields omitted */ }
A handle to a SyncTable with read access.
It is acquired either by a pin, or by exclusive access to the table.
Implementations
impl<'a, K, V, S: BuildHasher> Read<'a, K, V, S>
[src]
impl<'a, K, V, S: BuildHasher> Read<'a, K, V, S>
[src]pub fn get_potential<Q: ?Sized>(
self,
key: &Q,
hash: Option<u64>
) -> Result<(&'a K, &'a V), PotentialSlot<'a>> where
K: Borrow<Q>,
Q: Eq + Hash,
[src]
self,
key: &Q,
hash: Option<u64>
) -> Result<(&'a K, &'a V), PotentialSlot<'a>> where
K: Borrow<Q>,
Q: Eq + Hash,
Gets a reference to an element in the table or a potential location where that element could be.
pub fn get<Q: ?Sized>(
self,
key: &Q,
hash: Option<u64>
) -> Option<(&'a K, &'a V)> where
K: Borrow<Q>,
Q: Eq + Hash,
[src]
self,
key: &Q,
hash: Option<u64>
) -> Option<(&'a K, &'a V)> where
K: Borrow<Q>,
Q: Eq + Hash,
Gets a reference to an element in the table.
impl<'a, K, V, S> Read<'a, K, V, S>
[src]
impl<'a, K, V, S> Read<'a, K, V, S>
[src]pub fn get_with_eq(
self,
hash: u64,
eq: impl FnMut(&K, &V) -> bool
) -> Option<(&'a K, &'a V)>
[src]
self,
hash: u64,
eq: impl FnMut(&K, &V) -> bool
) -> Option<(&'a K, &'a V)>
Gets a reference to an element in the table with a custom equality function.
pub fn capacity(self) -> usize
[src]
Returns the number of elements the map can hold without reallocating.
pub fn len(self) -> usize
[src]
Returns the number of elements in the table.
pub fn iter(self) -> Iter<'a, K, V>ⓘ
[src]
An iterator visiting all key-value pairs in arbitrary order.
The iterator element type is (&'a K, &'a V)
.
Trait Implementations
Auto Trait Implementations
impl<'a, K, V, S = RandomState> !RefUnwindSafe for Read<'a, K, V, S>
impl<'a, K, V, S = RandomState> !RefUnwindSafe for Read<'a, K, V, S>
impl<'a, K, V, S = RandomState> !UnwindSafe for Read<'a, K, V, S>
impl<'a, K, V, S = RandomState> !UnwindSafe for Read<'a, K, V, S>