pub struct ReferenceTimeBuilder { /* private fields */ }Expand description
Builder for ReferenceTime.
Implementations§
Source§impl ReferenceTimeBuilder
impl ReferenceTimeBuilder
Sourcepub fn clock_type<VALUE: Into<TimeClockType>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn clock_type<VALUE: Into<TimeClockType>>( &mut self, value: VALUE, ) -> &mut Self
The required “clock_type” field represents the type of clock used for time measurements. The value “system” represents a clock that uses system time, commonly measured against a chosen or well-known epoch. However, depending on the system, System time can potentially jump forward or back. In contrast, a clock using monotonic time is generally guaranteed to never go backwards. The value “monotonic” represents such a clock.
Sourcepub fn epoch<VALUE: Into<TimeEpoch>>(&mut self, value: VALUE) -> &mut Self
pub fn epoch<VALUE: Into<TimeEpoch>>(&mut self, value: VALUE) -> &mut Self
The required “epoch” field is the start of the ReferenceTime. When using the “system” clock type, the epoch field SHOULD have a date/time value using the format defined in RFC3339. However, the value “unknown” MAY be used
Sourcepub fn wall_clock_time<VALUE: Into<RFC3339DateTime>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn wall_clock_time<VALUE: Into<RFC3339DateTime>>( &mut self, value: VALUE, ) -> &mut Self
The optional “wall_clock_time” field can be used to provide an approximate date/time value that logging commenced at if the epoch value is “unknown”. It uses the format defined in RFC3339. Note that conversion of timestamps to calendar time based on wall clock times cannot be safely relied on.
Source§impl ReferenceTimeBuilder
impl ReferenceTimeBuilder
pub fn build(&mut self) -> ReferenceTime
Trait Implementations§
Source§impl Clone for ReferenceTimeBuilder
impl Clone for ReferenceTimeBuilder
Source§fn clone(&self) -> ReferenceTimeBuilder
fn clone(&self) -> ReferenceTimeBuilder
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ReferenceTimeBuilder
impl RefUnwindSafe for ReferenceTimeBuilder
impl Send for ReferenceTimeBuilder
impl Sync for ReferenceTimeBuilder
impl Unpin for ReferenceTimeBuilder
impl UnwindSafe for ReferenceTimeBuilder
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)