[][src]Struct amadeus_types::Timestamp

pub struct Timestamp { /* fields omitted */ }

Methods

impl Timestamp[src]

pub fn from_date_time(date: Date, time: Time) -> Option<Self>[src]

Create a Timestamp from a Date and Time.

pub fn from_millis(millis: i64) -> Self[src]

Create a Timestamp from the number of milliseconds since the Unix epoch

pub fn from_micros(micros: i64) -> Self[src]

Create a Timestamp from the number of microseconds since the Unix epoch

pub fn from_nanos(nanos: i64) -> Self[src]

Create a Timestamp from the number of nanoseconds since the Unix epoch

pub fn as_date_time(&self) -> (Date, Time)[src]

Get the Date and Time from this Timestamp.

pub fn as_millis(&self) -> Option<i64>[src]

Get the number of milliseconds since the Unix epoch

pub fn as_micros(&self) -> Option<i64>[src]

Get the number of microseconds since the Unix epoch

pub fn as_nanos(&self) -> Option<i64>[src]

Get the number of nanoseconds since the Unix epoch

Trait Implementations

impl DowncastImpl<Value> for Timestamp[src]

impl Eq for Timestamp[src]

impl Clone for Timestamp[src]

impl PartialOrd<Timestamp> for Timestamp[src]

impl Ord for Timestamp[src]

impl PartialEq<Timestamp> for Timestamp[src]

impl PartialEq<Timestamp> for Value[src]

impl From<NaiveDateTime> for Timestamp[src]

impl From<Timestamp> for Value[src]

impl Copy for Timestamp[src]

impl Hash for Timestamp[src]

impl Display for Timestamp[src]

impl Debug for Timestamp[src]

impl TryFrom<Timestamp> for NaiveDateTime[src]

type Error = ()

The type returned in the event of a conversion error.

impl Serialize for Timestamp[src]

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

Auto Trait Implementations

Blanket Implementations

impl<A, B> Downcast<A> for B where
    A: DowncastImpl<B>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

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> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

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