pub struct Peer { /* private fields */ }Implementations§
source§impl Peer
impl Peer
pub fn new( our_id: ReferenceId, peer_id: ReferenceId, local_clock_time: NtpInstant, system_config: SystemConfig ) -> Self
pub fn new_nts( our_id: ReferenceId, peer_id: ReferenceId, local_clock_time: NtpInstant, system_config: SystemConfig, nts: Box<PeerNtsData> ) -> Self
pub fn update_config(&mut self, system_config: SystemConfig)
pub fn current_poll_interval(&self, system: SystemSnapshot) -> PollInterval
pub fn generate_poll_message<'a>( &mut self, buf: &'a mut [u8], system: SystemSnapshot, system_config: &SystemConfig ) -> Result<&'a [u8], PollError>
pub fn handle_incoming( &mut self, system: SystemSnapshot, message: &[u8], local_clock_time: NtpInstant, send_time: NtpTimestamp, recv_time: NtpTimestamp ) -> Result<Update, IgnoreReason>
pub fn reset(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl !UnwindSafe for Peer
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