pub struct HashCm<K, S = DefaultHasher> { /* private fields */ }
Trait Implementations§
source§impl<K, S> Cm for HashCm<K, S>
impl<K, S> Cm for HashCm<K, S>
§type Error = Infallible
type Error = Infallible
The error type returned by the conflict manager.
§type Options = HashCmOptions<S>
type Options = HashCmOptions<S>
The options type used to create the conflict manager.
source§fn new(options: Self::Options) -> Result<Self, Self::Error>
fn new(options: Self::Options) -> Result<Self, Self::Error>
Create a new conflict manager with the given options.
source§fn mark_conflict(&mut self, key: &Self::Key)
fn mark_conflict(&mut self, key: &Self::Key)
Mark the key is .
source§fn has_conflict(&self, other: &Self) -> bool
fn has_conflict(&self, other: &Self) -> bool
Returns true if we have a conflict.
source§impl<K, S> CmEquivalent for HashCm<K, S>
impl<K, S> CmEquivalent for HashCm<K, S>
source§fn mark_read_equivalent<Q>(&mut self, key: &Q)
fn mark_read_equivalent<Q>(&mut self, key: &Q)
Optimized version of [
mark_read
] that accepts borrowed keys. Optional to implement.Auto Trait Implementations§
impl<K, S> Freeze for HashCm<K, S>where
S: Freeze,
impl<K, S> RefUnwindSafe for HashCm<K, S>where
K: RefUnwindSafe,
S: RefUnwindSafe,
impl<K, S> Send for HashCm<K, S>
impl<K, S> Sync for HashCm<K, S>
impl<K, S> Unpin for HashCm<K, S>
impl<K, S> UnwindSafe for HashCm<K, S>where
K: UnwindSafe,
S: UnwindSafe,
Blanket Implementations§
source§impl<T> AsyncCm for Twhere
T: Cm,
impl<T> AsyncCm for Twhere
T: Cm,
source§async fn new(
options: <T as AsyncCm>::Options
) -> Result<T, <T as AsyncCm>::Error>
async fn new( options: <T as AsyncCm>::Options ) -> Result<T, <T as AsyncCm>::Error>
Create a new conflict manager with the given options.
source§async fn mark_conflict(&mut self, key: &<T as AsyncCm>::Key)
async fn mark_conflict(&mut self, key: &<T as AsyncCm>::Key)
Mark the key is .
source§async fn has_conflict(&self, other: &T) -> bool
async fn has_conflict(&self, other: &T) -> bool
Returns true if we have a conflict.
source§impl<T> AsyncCmEquivalent for Twhere
T: CmEquivalent,
impl<T> AsyncCmEquivalent for Twhere
T: CmEquivalent,
source§async fn mark_read_equivalent<Q>(&mut self, key: &Q)
async fn mark_read_equivalent<Q>(&mut self, key: &Q)
Optimized version of [
mark_read
] that accepts borrowed keys. Optional to implement.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