Struct concread::hashmap::asynch::HashMapReadSnapshot
source · pub struct HashMapReadSnapshot<'a, K, V>{ /* private fields */ }
Expand description
A point-in-time snapshot of the tree from within a read OR write. This is useful for building other transactional types on top of this structure, as you need a way to downcast both HashMapReadTxn or HashMapWriteTxn to a singular reader type for a number of get_inner() style patterns.
This snapshot IS safe within the read thread due to the nature of the implementation borrowing the inner tree to prevent mutations within the same thread while the read snapshot is open.
Implementations§
source§impl<K: Hash + Eq + Clone + Debug + Sync + Send + 'static, V: Clone + Sync + Send + 'static> HashMapReadSnapshot<'_, K, V>
impl<K: Hash + Eq + Clone + Debug + Sync + Send + 'static, V: Clone + Sync + Send + 'static> HashMapReadSnapshot<'_, K, V>
Auto Trait Implementations§
impl<'a, K, V> Freeze for HashMapReadSnapshot<'a, K, V>
impl<'a, K, V> RefUnwindSafe for HashMapReadSnapshot<'a, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K, V> Send for HashMapReadSnapshot<'a, K, V>
impl<'a, K, V> Sync for HashMapReadSnapshot<'a, K, V>
impl<'a, K, V> Unpin for HashMapReadSnapshot<'a, K, V>
impl<'a, K, V> UnwindSafe for HashMapReadSnapshot<'a, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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