Trait AsyncCmEquivalent

Source
pub trait AsyncCmEquivalent: AsyncCm {
    // Required methods
    fn mark_read_equivalent<Q>(&mut self, key: &Q) -> impl Future<Output = ()>
       where Self::Key: Borrow<Q>,
             Q: Hash + Eq + ?Sized;
    fn mark_conflict_equivalent<Q>(
        &mut self,
        key: &Q,
    ) -> impl Future<Output = ()>
       where Self::Key: Borrow<Q>,
             Q: Hash + Eq + ?Sized;
}
Expand description

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

Required Methods§

Source

fn mark_read_equivalent<Q>(&mut self, key: &Q) -> impl Future<Output = ()>
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) -> impl Future<Output = ()>
where Self::Key: Borrow<Q>, Q: Hash + Eq + ?Sized,

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§