[−][src]Struct unix::time::EpochTime
Time measured since the Unix epoch
The Unix epoch = Julian date 2440587.5 = Gregorian date January 1st 1970 00:00 UTC
Implementations
impl EpochTime
[src]
pub fn now() -> Self
[src]
Return the present time.
pub fn from_ns_since_epoch(n: i128) -> Self
[src]
Convert from nanoseconds since the Unix epoch to an EpochTime
.
pub fn to_ns_since_epoch(self) -> i128
[src]
Convert from an EpochTime
to nanoseconds since the Unix epoch.
Trait Implementations
impl Add<Span> for EpochTime
[src]
type Output = Self
The resulting type after applying the +
operator.
pub fn add(self, other: Span) -> Self
[src]
impl AddAssign<Span> for EpochTime
[src]
pub fn add_assign(&mut self, other: Span)
[src]
impl Clone for EpochTime
[src]
pub fn clone(&self) -> EpochTime
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for EpochTime
[src]
impl Debug for EpochTime
[src]
impl Eq for EpochTime
[src]
impl Hash for EpochTime
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for EpochTime
[src]
pub fn cmp(&self, other: &EpochTime) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<EpochTime> for EpochTime
[src]
impl PartialOrd<EpochTime> for EpochTime
[src]
pub fn partial_cmp(&self, other: &EpochTime) -> Option<Ordering>
[src]
pub fn lt(&self, other: &EpochTime) -> bool
[src]
pub fn le(&self, other: &EpochTime) -> bool
[src]
pub fn gt(&self, other: &EpochTime) -> bool
[src]
pub fn ge(&self, other: &EpochTime) -> bool
[src]
impl StructuralEq for EpochTime
[src]
impl StructuralPartialEq for EpochTime
[src]
impl Sub<EpochTime> for EpochTime
[src]
type Output = Span
The resulting type after applying the -
operator.
pub fn sub(self, other: Self) -> Span
[src]
impl Sub<Span> for EpochTime
[src]
type Output = Self
The resulting type after applying the -
operator.
pub fn sub(self, other: Span) -> Self
[src]
impl SubAssign<Span> for EpochTime
[src]
pub fn sub_assign(&mut self, other: Span)
[src]
Auto Trait Implementations
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,
pub 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> TryClone for T where
T: Clone,
[src]
T: Clone,
type Error = Void
pub fn try_clone(&self) -> Result<T, Void>
[src]
pub fn try_clone_from(&mut self, other: &T) -> Result<(), Void>
[src]
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.
pub 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>,