pub struct ClientRecord {
pub last_seen: f64,
pub requests: u64,
pub responses: u64,
pub dropped: u64,
pub last_receive: Option<NtpTimestamp>,
pub last_transmit: Option<NtpTimestamp>,
pub last_receive_sent: Option<NtpTimestamp>,
pub interleaved_now: bool,
/* private fields */
}Expand description
Per-client state: enough for rate limiting, interleaved mode and the MRU report, and no more — this is multiplied by every client that has ever spoken to us.
Fields§
§last_seen: f64§requests: u64§responses: u64§dropped: u64§last_receive: Option<NtpTimestamp>T2 of the last request we accepted.
last_transmit: Option<NtpTimestamp>The true transmit timestamp of our last response, once the driver
reports it. None until then, which is why interleaved mode cannot
answer the very first request.
last_receive_sent: Option<NtpTimestamp>The receive timestamp we put in our last response. A client asks for interleaved mode by echoing exactly this.
interleaved_now: boolWhether the last answered request was actually served interleaved.
Distinct from “we could serve it interleaved”: every client we have answered once is capable, but only a client that asks is using it, and an operator reading a client log needs the second fact.
Trait Implementations§
Source§impl Clone for ClientRecord
impl Clone for ClientRecord
Source§fn clone(&self) -> ClientRecord
fn clone(&self) -> ClientRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ClientRecord
Auto Trait Implementations§
impl Freeze for ClientRecord
impl RefUnwindSafe for ClientRecord
impl Send for ClientRecord
impl Sync for ClientRecord
impl Unpin for ClientRecord
impl UnsafeUnpin for ClientRecord
impl UnwindSafe for ClientRecord
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