[−][src]Struct fog_pack::Timestamp
Structure for holding a raw fog-pack timestamp.
Fields
sec: i64nano: u32Implementations
impl Timestamp[src]
pub fn from_raw(sec: i64, nano: u32) -> Option<Timestamp>[src]
Create a UTC timestamp from a raw seconds + nanoseconds value
pub fn from_sec(sec: i64) -> Timestamp[src]
pub fn min_value() -> Timestamp[src]
Minimum possible time that can be represented
pub fn max_value() -> Timestamp[src]
Maximum possible time that can be represented
pub fn min(self, other: Timestamp) -> Timestamp[src]
pub fn max(self, other: Timestamp) -> Timestamp[src]
pub fn next(self) -> Timestamp[src]
Add 1 nanosecond to timestamp. Will go into leap second (nanoseconds > 1e6) before it goes to the next second.
pub fn prev(self) -> Timestamp[src]
Subtract 1 nanosecond from timestamp. Will go into leap second (nanoseconds > 1e6) when it must decrement a second.
pub fn timestamp(&self) -> i64[src]
Return the UNIX timestamp (number of seconds since January 1, 1970 0:00:00 UTC)
pub fn timestamp_subsec_nanos(&self) -> u32[src]
pub fn now() -> Option<Timestamp>[src]
Create a Timestamp based on the current system time. Can fail if the system clock is extremely wrong - the time is before Unix Epoch, or nanosecond portion is greater than 2 seconds.
Trait Implementations
impl Add<i64> for Timestamp[src]
type Output = Timestamp
The resulting type after applying the + operator.
fn add(self, rhs: i64) -> Self[src]
impl Clone for Timestamp[src]
impl Copy for Timestamp[src]
impl Debug for Timestamp[src]
impl Display for Timestamp[src]
impl Eq for Timestamp[src]
impl From<Timestamp> for Value[src]
impl Ord for Timestamp[src]
fn cmp(&self, other: &Timestamp) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialEq<Timestamp> for Timestamp[src]
impl PartialOrd<Timestamp> for Timestamp[src]
fn partial_cmp(&self, other: &Timestamp) -> Option<Ordering>[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl StructuralEq for Timestamp[src]
impl StructuralPartialEq for Timestamp[src]
impl Sub<i64> for Timestamp[src]
Auto Trait Implementations
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,