pub struct PdState {
pub next_sqn: Sqn,
pub use_crc: bool,
pub last_seen_ms: u64,
/* private fields */
}Expand description
Per-PD bookkeeping owned by the ACU driver.
Fields§
§next_sqn: SqnNext SQN to send.
use_crc: boolWhether the PD prefers CRC trailers.
last_seen_ms: u64Last successful exchange (ms, from the Clock).
Implementations§
Source§impl PdState
impl PdState
Sourcepub fn is_offline(&self, now_ms: u64) -> bool
pub fn is_offline(&self, now_ms: u64) -> bool
true once we’ve ever heard from the PD and the last exchange is
older than crate::OFFLINE_THRESHOLD_MS. Returns false while we
are still in the initial-connect window — call [mark_offline] if
you want to force-declare a brand-new PD off-line.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PdState
impl RefUnwindSafe for PdState
impl Send for PdState
impl Sync for PdState
impl Unpin for PdState
impl UnsafeUnpin for PdState
impl UnwindSafe for PdState
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