pub enum LockState {
Unlocked,
Locked,
Lost,
}Expand description
The lock-state machine. A behaviour locks onto a target (an operator
designate, or an auto-lock). While Locked it is acquiring until the
stream first becomes usable; once it has had a usable reading, the stream
going stale or the link dropping drops it to Lost. The only way out of
Lost is an explicit re-lock, there is no auto-re-acquire. A lock that has
never yet had a usable reading does NOT drop to Lost (there is nothing to
lose); it stays Locked, holding, until a result arrives or it is released.
Variants§
Unlocked
No lock (idle).
Locked
Locked: either acquiring (no usable reading yet) or tracking.
Lost
The lock was dropped (a stream that HAD been usable went stale / the link dropped). Stays here until an explicit re-lock; never auto-re-acquires.
Trait Implementations§
impl Copy for LockState
Source§impl<'de> Deserialize<'de> for LockState
impl<'de> Deserialize<'de> for LockState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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<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