#[non_exhaustive]pub struct RelativeTime {
pub time_unit: TimeUnit,
pub start_time_val: i64,
/* private fields */
}Expand description
time representation for last x units.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.time_unit: TimeUnit§start_time_val: i64Implementations§
Source§impl RelativeTime
impl RelativeTime
Sourcepub fn set_time_unit<T: Into<TimeUnit>>(self, v: T) -> Self
pub fn set_time_unit<T: Into<TimeUnit>>(self, v: T) -> Self
Sourcepub fn set_start_time_val<T: Into<i64>>(self, v: T) -> Self
pub fn set_start_time_val<T: Into<i64>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for RelativeTime
impl Clone for RelativeTime
Source§fn clone(&self) -> RelativeTime
fn clone(&self) -> RelativeTime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RelativeTime
impl Debug for RelativeTime
Source§impl Default for RelativeTime
impl Default for RelativeTime
Source§fn default() -> RelativeTime
fn default() -> RelativeTime
Returns the “default value” for a type. Read more
Source§impl Message for RelativeTime
impl Message for RelativeTime
Source§impl PartialEq for RelativeTime
impl PartialEq for RelativeTime
Source§fn eq(&self, other: &RelativeTime) -> bool
fn eq(&self, other: &RelativeTime) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RelativeTime
Auto Trait Implementations§
impl Freeze for RelativeTime
impl RefUnwindSafe for RelativeTime
impl Send for RelativeTime
impl Sync for RelativeTime
impl Unpin for RelativeTime
impl UnsafeUnpin for RelativeTime
impl UnwindSafe for RelativeTime
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