Struct SdIdTimeQuality

Source
pub struct SdIdTimeQuality(/* private fields */);
Expand description

RFC:

The SD-ID “timeQuality” MAY be used by the originator to describe its notion of system time. This SD-ID SHOULD be written if the originator is not properly synchronized with a reliable external time source or if it does not know whether its time zone information is correct. The main use of this structured data element is to provide some information on the level of trust it has in the TIMESTAMP described in Section 6.2.3. All parameters are OPTIONAL.

RFC:

The “tzKnown” parameter indicates whether the originator knows its time zone. If it does, the value “1” MUST be used. If the time zone information is in doubt, the value “0” MUST be used. If the originator knows its time zone but decides to emit time in UTC, the value “1” MUST be used (because the time zone is known). tz_known

RFC:

The “isSynced” parameter indicates whether the originator is synchronized to a reliable external time source, e.g., via NTP. If the originator is time synchronized, the value “1” MUST be used. If not, the value “0” MUST be used. is_synced

RFC:

The “syncAccuracy” parameter indicates how accurate the originator thinks its time synchronization is. It is an integer describing the maximum number of microseconds that its clock may be off between synchronization intervals. If the value “0” is used for “isSynced”, this parameter MUST NOT be specified. If the value “1” is used for “isSynced” but the “syncAccuracy” parameter is absent, a collector or relay can assume that the time information provided is accurate enough to be considered correct. The “syncAccuracy” parameter MUST be written only if the originator actually has knowledge of the reliability of the external time source. sync_acc

Implementations§

Source§

impl SdIdTimeQuality

Source

pub fn new(tz_known: bool, is_synced: bool, sync_acc: Option<u64>) -> Self

Trait Implementations§

Source§

impl Clone for SdIdTimeQuality

Source§

fn clone(&self) -> SdIdTimeQuality

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SdIdTimeQuality

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SdIdTimeQuality

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SdIdTimeQuality

Source§

fn eq(&self, other: &SdIdTimeQuality) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SdIdIntrf for SdIdTimeQuality

Source§

const SD_ID_TEXT: &'static str = "timeQuality"

SD-ID identifier.
Source§

fn format_msg(&self) -> String

Formats the internals.
Source§

impl Eq for SdIdTimeQuality

Source§

impl StructuralPartialEq for SdIdTimeQuality

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.