[][src]Struct tai64::TAI64

pub struct TAI64(pub u64);

A TAI64 label.

Methods

impl TAI64[src]

pub fn now() -> Self[src]

Get TAI64N timestamp according to system clock.

pub fn from_slice(slice: &[u8]) -> Result<Self, 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 From<TAI64N> for TAI64[src]

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

Remove the nanosecond component from a TAI64N value

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

fn from(bytes: [u8; 8]) -> Self[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) -> Self[src]

Remove the nanosecond component from a TAI64N value

impl Debug for TAI64[src]

impl Sub<u64> for TAI64[src]

type Output = Self

The resulting type after applying the - operator.

impl PartialEq<TAI64> for TAI64[src]

impl Eq for TAI64[src]

impl Ord for TAI64[src]

impl PartialOrd<TAI64> for TAI64[src]

impl<'a> TryFrom<&'a [u8]> for TAI64[src]

type Error = Error

The type returned in the event of a conversion error.

impl Add<u64> for TAI64[src]

type Output = Self

The resulting type after applying the + operator.

impl Hash for TAI64[src]

impl Copy for TAI64[src]

impl Clone for TAI64[src]

impl Serialize for TAI64[src]

impl<'de> Deserialize<'de> for TAI64[src]

Auto Trait Implementations

impl Unpin for TAI64

impl Send for TAI64

impl Sync for TAI64

impl UnwindSafe for TAI64

impl RefUnwindSafe 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.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]