[−][src]Struct mohan::tai64::TAI64N
A TAI64N
timestamp.
Invariant: The nanosecond part <= 999999999.
Methods
impl TAI64N
[src]
pub fn now() -> TAI64N
[src]
Get TAI64N
timestamp according to system clock.
pub fn from_slice(slice: &[u8]) -> Result<TAI64N, Error>
[src]
Parse TAI64N from a byte slice
pub fn to_bytes(self) -> [u8; 12]
[src]
Serialize TAI64N as bytes
pub fn duration_since(&self, other: &TAI64N) -> Result<Duration, Duration>
[src]
Calculate how much time passes since the other
timestamp.
Returns Ok(Duration)
if other
is earlier than self
,
Err(Duration)
otherwise.
pub fn from_system_time(t: &SystemTime) -> Self
[src]
Convert SystemTime
to TAI64N
.
pub fn to_system_time(&self) -> SystemTime
[src]
Convert TAI64N
to SystemTime
.
Trait Implementations
impl Eq for TAI64N
[src]
impl Clone for TAI64N
[src]
impl PartialOrd<TAI64N> for TAI64N
[src]
fn partial_cmp(&self, other: &TAI64N) -> Option<Ordering>
[src]
fn lt(&self, other: &TAI64N) -> bool
[src]
fn le(&self, other: &TAI64N) -> bool
[src]
fn gt(&self, other: &TAI64N) -> bool
[src]
fn ge(&self, other: &TAI64N) -> bool
[src]
impl PartialEq<TAI64N> for TAI64N
[src]
impl Ord for TAI64N
[src]
fn cmp(&self, other: &TAI64N) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl From<TAI64N> for TAI64
[src]
impl From<TAI64> for TAI64N
[src]
impl From<TAI64N> for [u8; 12]
[src]
impl From<SystemTime> for TAI64N
[src]
fn from(t: SystemTime) -> TAI64N
[src]
impl Copy for TAI64N
[src]
impl Hash for TAI64N
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Add<Duration> for TAI64N
[src]
type Output = TAI64N
The resulting type after applying the +
operator.
fn add(self, d: Duration) -> TAI64N
[src]
impl Sub<Duration> for TAI64N
[src]
type Output = TAI64N
The resulting type after applying the -
operator.
fn sub(self, d: Duration) -> TAI64N
[src]
impl Debug for TAI64N
[src]
impl TryFrom<[u8; 12]> for TAI64N
[src]
Auto Trait Implementations
impl Send for TAI64N
impl Unpin for TAI64N
impl Sync for TAI64N
impl UnwindSafe for TAI64N
impl RefUnwindSafe for TAI64N
Blanket Implementations
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<N> NodeTrait for N where
N: Copy + Ord + Hash,
[src]
N: Copy + Ord + Hash,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self