pub trait SortableLock {
type Guard;
// Required methods
fn sort_key(&self) -> SortKey;
fn lock_presorted(&self) -> Self::Guard;
}Expand description
A lock that can be locked in a way that ensures that multiple locks are always locked in the same order..
Required Associated Types§
Required Methods§
Sourcefn lock_presorted(&self) -> Self::Guard
fn lock_presorted(&self) -> Self::Guard
Lock this lock.
This method assumes that lock sorting has already been done.
lock_all from LockGroup should be used if you want to lock with sorting.