pub struct LockGate { /* private fields */ }Expand description
The lock-state safety gate.
Implementations§
Source§impl LockGate
impl LockGate
Sourcepub fn is_locked(&self) -> bool
pub fn is_locked(&self) -> bool
Whether the behaviour is locked (acquiring or tracking). commanding (a
behaviour actually driving the FC) additionally requires the stream to be
usable this cycle; the session combines the two.
Sourcepub fn lock(&mut self)
pub fn lock(&mut self)
Explicitly acquire (or re-acquire) the lock, an operator designate. This
is the ONLY transition out of Lost.
Sourcepub fn update(&mut self, stream_usable: bool)
pub fn update(&mut self, stream_usable: bool)
Advance the gate for one cycle given whether the underlying stream is
usable (fresh + link up). A Locked gate that HAS been usable and then
is not drops to Lost; a Locked gate still acquiring (never usable yet)
stays Locked. A Lost gate stays Lost even when the stream becomes
usable again, it never auto-re-acquires.
Trait Implementations§
impl Copy for LockGate
impl Eq for LockGate
impl StructuralPartialEq for LockGate
Auto Trait Implementations§
impl Freeze for LockGate
impl RefUnwindSafe for LockGate
impl Send for LockGate
impl Sync for LockGate
impl Unpin for LockGate
impl UnsafeUnpin for LockGate
impl UnwindSafe for LockGate
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