pub enum LockKind {
Writer,
Reader,
WriterInProcess,
}Expand description
Lock category for Error::Busy. Three variants because the
three categories of contention produce different operator
guidance: a contended cross-process WRITER_LOCK means another
process is writing; a contended WriterInProcess means another
thread of the same process is writing; a contended reader lock
is unusual (31 slots, shared) and indicates either a saturated
31+-process workload or a stale lock left by a frozen process.
Variants§
Writer
Cross-process WRITER_LOCK at byte 96 of the
<db>.obj-lock sidecar file.
Reader
Cross-process READER_LOCK byte (any slot in 97..128 of
the <db>.obj-lock sidecar file).
WriterInProcess
In-process write mutex (a sibling thread is mid-write).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LockKind
impl<'de> Deserialize<'de> for LockKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LockKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LockKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for LockKind
impl Serialize for LockKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for LockKind
impl Eq for LockKind
impl StructuralPartialEq for LockKind
Auto Trait Implementations§
impl Freeze for LockKind
impl RefUnwindSafe for LockKind
impl Send for LockKind
impl Sync for LockKind
impl Unpin for LockKind
impl UnsafeUnpin for LockKind
impl UnwindSafe for LockKind
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