[][src]Struct tai64::TAI64

pub struct TAI64(pub u64);

A TAI64 label.

Methods

impl TAI64[src]

pub fn now() -> TAI64[src]

Get TAI64N timestamp according to system clock.

pub fn from_slice(slice: &[u8]) -> Result<TAI64, Error>[src]

Parse TAI64 from a byte slice

pub fn to_bytes(self) -> [u8; 8][src]

Serialize TAI64 as bytes

pub fn from_unix(secs: i64) -> Self[src]

Convert Unix timestamp to TAI64.

pub fn to_unix(self) -> i64[src]

Convert TAI64 to unix timestamp.

Trait Implementations

impl PartialEq<TAI64> for TAI64[src]

impl Eq for TAI64[src]

impl Ord for TAI64[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<TAI64> for TAI64[src]

impl Copy for TAI64[src]

impl From<TAI64N> for TAI64[src]

fn from(other: TAI64N) -> TAI64[src]

Remove the nanosecond component from a TAI64N value

impl From<[u8; 8]> for TAI64[src]

fn from(bytes: [u8; 8]) -> TAI64[src]

Parse TAI64 from external representation

impl From<TAI64> for [u8; 8][src]

fn from(tai: TAI64) -> [u8; 8][src]

Serialize TAI64 to external representation

impl From<TAI64> for TAI64N[src]

fn from(other: TAI64) -> TAI64N[src]

Remove the nanosecond component from a TAI64N value

impl Debug for TAI64[src]

impl Add<u64> for TAI64[src]

type Output = TAI64

The resulting type after applying the + operator.

impl Sub<u64> for TAI64[src]

type Output = TAI64

The resulting type after applying the - operator.

impl Hash for TAI64[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for TAI64[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for TAI64

impl Sync for TAI64

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.