#[repr(i64)]pub enum Clock {
Unspecified = 0,
Wall = 1,
Monotonic = 2,
Both = 3,
}Expand description
Which server clock sources supply timestamp fields.
§The zero value
Clock::Unspecified is the wire default, meaning the Clock tag was
absent from an open parameter payload — which is valid, and is what an empty
payload decodes to. It does not mean a peer may send an explicit Clock tag
encoding zero: TryFrom<i64> still rejects an explicit
zero as an invalid enum value, so this state is only ever reached by
omission. encode omits the tag for Unspecified rather
than emitting an explicit zero, which round-trips absence faithfully.
Unspecified selects no clock, so has_wall and
has_mono are both false for it and no timestamp field
is laid out. A client that wants timestamps must request a real clock; the
irtt-client configuration path rejects Unspecified.
Variants§
Unspecified = 0
Wire default for an absent Clock tag. Never produced from an explicit encoded value.
Wall = 1
Monotonic = 2
Both = 3
Implementations§
Trait Implementations§
impl Copy for Clock
impl Eq for Clock
impl StructuralPartialEq for Clock
Source§impl TryFrom<i64> for Clock
impl TryFrom<i64> for Clock
Source§fn try_from(value: i64) -> Result<Self>
fn try_from(value: i64) -> Result<Self>
Converts an explicitly encoded Clock value.
Zero is rejected: it is only valid as an absent tag, never as an encoded
one. Clock::Unspecified is therefore unreachable through this
conversion by design.