Trait txn_core::sync::CmEquivalent

source ·
pub trait CmEquivalent: Cm {
    // Required methods
    fn mark_read_equivalent<Q>(&mut self, key: &Q)
       where Self::Key: Borrow<Q>,
             Q: Hash + Eq + ?Sized;
    fn mark_conflict_equivalent<Q>(&mut self, key: &Q)
       where Self::Key: Borrow<Q>,
             Q: Hash + Eq + ?Sized;
}
Expand description

An optimized version of the Cm trait that if your conflict manager is depend on hash.

Required Methods§

source

fn mark_read_equivalent<Q>(&mut self, key: &Q)
where Self::Key: Borrow<Q>, Q: Hash + Eq + ?Sized,

Optimized version of [mark_read] that accepts borrowed keys. Optional to implement.

source

fn mark_conflict_equivalent<Q>(&mut self, key: &Q)
where Self::Key: Borrow<Q>, Q: Hash + Eq + ?Sized,

Optimized version of [mark_conflict] that accepts borrowed keys. Optional to implement.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<K, S> CmEquivalent for HashCm<K, S>
where S: BuildHasher, K: Hash + Eq,