Struct ntp_proto::StandardClockController
source · pub struct StandardClockController<C: NtpClock, PeerID: Hash + Eq + Copy + Debug> { /* private fields */ }Trait Implementations§
source§impl<C: Debug + NtpClock, PeerID: Debug + Hash + Eq + Copy + Debug> Debug for StandardClockController<C, PeerID>
impl<C: Debug + NtpClock, PeerID: Debug + Hash + Eq + Copy + Debug> Debug for StandardClockController<C, PeerID>
source§impl<C: NtpClock, PeerID: Hash + Eq + Copy + Debug> TimeSyncController<C, PeerID> for StandardClockController<C, PeerID>
impl<C: NtpClock, PeerID: Hash + Eq + Copy + Debug> TimeSyncController<C, PeerID> for StandardClockController<C, PeerID>
type AlgorithmConfig = AlgorithmConfig
source§fn new(clock: C, config: SystemConfig, algo_config: AlgorithmConfig) -> Self
fn new(clock: C, config: SystemConfig, algo_config: AlgorithmConfig) -> Self
Create a new clock controller controling the given clock
source§fn update_config(&mut self, config: SystemConfig, algo_config: AlgorithmConfig)
fn update_config(&mut self, config: SystemConfig, algo_config: AlgorithmConfig)
Update used system config
source§fn peer_remove(&mut self, id: PeerID)
fn peer_remove(&mut self, id: PeerID)
Notify the controller that a previous peer has gone
source§fn peer_update(&mut self, id: PeerID, usable: bool)
fn peer_update(&mut self, id: PeerID, usable: bool)
Notify the controller that the status of a peer (whether
or not it is usable for synchronization) has changed.
source§fn peer_measurement(
&mut self,
id: PeerID,
measurement: Measurement
) -> StateUpdate<PeerID>
fn peer_measurement( &mut self, id: PeerID, measurement: Measurement ) -> StateUpdate<PeerID>
Notify the controller of a new measurement from a peer.
The list of peerIDs is used for loop detection, with the
first peerID given considered the primary peer used.
source§fn time_update(&mut self) -> StateUpdate<PeerID>
fn time_update(&mut self) -> StateUpdate<PeerID>
Non-measurement driven update (queued via next_update)
source§fn peer_snapshot(&self, id: PeerID) -> Option<ObservablePeerTimedata>
fn peer_snapshot(&self, id: PeerID) -> Option<ObservablePeerTimedata>
Get a snapshot of the timekeeping state of a peer.
Auto Trait Implementations§
impl<C, PeerID> RefUnwindSafe for StandardClockController<C, PeerID>where C: RefUnwindSafe, PeerID: RefUnwindSafe,
impl<C, PeerID> Send for StandardClockController<C, PeerID>where PeerID: Send,
impl<C, PeerID> Sync for StandardClockController<C, PeerID>where C: Sync, PeerID: Sync,
impl<C, PeerID> Unpin for StandardClockController<C, PeerID>where C: Unpin, PeerID: Unpin,
impl<C, PeerID> UnwindSafe for StandardClockController<C, PeerID>where C: UnwindSafe, PeerID: UnwindSafe,
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