pub enum ChangeVerdict {
Accepted,
Refused {
offset_s: f64,
seen: u32,
},
GiveUp {
offset_s: f64,
},
}Expand description
What the maximum-change guard decided about a correction.
A time daemon’s most dangerous power is that it is believed. On a mesh, the node running your code is hardware you do not control, and a capability expires by this clock — so a source that can move it can move the boundary between “revoked” and “valid”. Authentication proves who a server is, not that it is telling the truth.
Variants§
Accepted
Within the limit, or no limit configured.
Refused
Larger than the limit: NO correction was made. seen counts how many
consecutive refusals have happened, so the caller can say so once
rather than on every poll.
GiveUp
Larger than the limit, and the allowance for refusals is spent. The caller should stop rather than keep running a clock it has decided it cannot steer.
Trait Implementations§
Source§impl Clone for ChangeVerdict
impl Clone for ChangeVerdict
Source§fn clone(&self) -> ChangeVerdict
fn clone(&self) -> ChangeVerdict
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 ChangeVerdict
Source§impl Debug for ChangeVerdict
impl Debug for ChangeVerdict
Source§impl PartialEq for ChangeVerdict
impl PartialEq for ChangeVerdict
impl StructuralPartialEq for ChangeVerdict
Auto Trait Implementations§
impl Freeze for ChangeVerdict
impl RefUnwindSafe for ChangeVerdict
impl Send for ChangeVerdict
impl Sync for ChangeVerdict
impl Unpin for ChangeVerdict
impl UnsafeUnpin for ChangeVerdict
impl UnwindSafe for ChangeVerdict
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