#[non_exhaustive]pub enum LockState {
Free,
Held {
pid: u32,
last_beat: Duration,
},
Crashed {
pid: u32,
},
RebootedUnder {
pid: u32,
},
Stale {
pid: u32,
last_beat: Duration,
},
}Expand description
What is known about a journal’s writer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Free
No lock file. The journal is free.
Held
A live process is writing this journal now. Refuse.
Fields
Crashed
The pid is gone and the writer died without releasing. Resume, noting that the last checkpoint interval may be missing.
RebootedUnder
The machine rebooted while this journal was locked, so the pid in the file is not the writer. Resume, and warn that a reboot loses more than a crash: anything the page cache had not flushed is gone.
Stale
Something holds that pid and it has stopped touching the lock: either the writer is hung or it died and the number was reissued. Refused, overridably.
Implementations§
Source§impl LockState
impl LockState
Sourcepub fn is_resumable(&self) -> bool
pub fn is_resumable(&self) -> bool
Whether the journal may be resumed without the user overriding anything.
Sourcepub fn may_have_lost_the_tail(&self) -> bool
pub fn may_have_lost_the_tail(&self) -> bool
Whether resuming loses more than one checkpoint interval.
True only after a reboot: every other stop is a process death, and the page cache
outlives a process. See journal for the survival table.
Trait Implementations§
impl Eq for LockState
impl StructuralPartialEq for LockState
Auto Trait Implementations§
impl Freeze for LockState
impl RefUnwindSafe for LockState
impl Send for LockState
impl Sync for LockState
impl Unpin for LockState
impl UnsafeUnpin for LockState
impl UnwindSafe for LockState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more