pub struct TimePoint { /* private fields */ }Expand description
One ordered position in a time series.
Implementations§
Source§impl TimePoint
impl TimePoint
pub fn new( label: impl Into<String>, duration: Option<Duration>, ) -> Result<Self, Error>
Sourcepub fn from_duration_parts(
label: impl Into<String>,
seconds: u64,
nanoseconds: u32,
) -> Result<Self, Error>
pub fn from_duration_parts( label: impl Into<String>, seconds: u64, nanoseconds: u32, ) -> Result<Self, Error>
Construct an exact stored duration, rejecting a normalized nanosecond value instead of silently carrying into the seconds field.
pub fn label(&self) -> &str
pub const fn duration(&self) -> Option<Duration>
Trait Implementations§
impl Eq for TimePoint
impl StructuralPartialEq for TimePoint
Auto Trait Implementations§
impl Freeze for TimePoint
impl RefUnwindSafe for TimePoint
impl Send for TimePoint
impl Sync for TimePoint
impl Unpin for TimePoint
impl UnsafeUnpin for TimePoint
impl UnwindSafe for TimePoint
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