#[non_exhaustive]pub enum Error {
IncorrectOriginTimestamp,
IncorrectMode,
IncorrectLeapIndicator,
IncorrectResponseVersion,
IncorrectStratumHeaders,
IncorrectPayload,
Network,
AddressResolve,
ResponseAddressMismatch,
}
Expand description
The error type for SNTP client Errors originate on network layer or during processing response from a NTP server
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IncorrectOriginTimestamp
Origin timestamp value in a NTP response differs from the value that has been sent in the NTP request
IncorrectMode
Incorrect mode value in a NTP response
IncorrectLeapIndicator
Incorrect Leap Indicator (LI) value in a NTP response
IncorrectResponseVersion
Incorrect version in a NTP response. Currently SNTPv4 is supported
IncorrectStratumHeaders
Incorrect stratum headers in a NTP response
IncorrectPayload
Payload size of a NTP response does not meet SNTPv4 specification
Network
Network error occurred.
AddressResolve
A NTP server address can not be resolved
ResponseAddressMismatch
A NTP server address response has been received from does not match to the address the request was sent to
Trait Implementations§
source§impl PartialEq for Error
impl PartialEq for Error
impl Copy for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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