Struct tozny_auth::protocol::Timestamp [-] [+] [src]

pub struct Timestamp(_);

Wraps a DateTime<UTC> value; implements serialization into the format expected by the Tozny API.

Methods

impl Timestamp

fn new(t: DateTime<UTC>) -> Timestamp

fn unwrap(self) -> DateTime<UTC>

fn as_slice(&self) -> &DateTime<UTC>

Trait Implementations

impl Decodable for Timestamp

fn decode<D: Decoder>(d: &mut D) -> Result<Timestamp, Error>

impl Encodable for Timestamp

Given a time, produces a string representing that time as the number of seconds since January 1, 1970.

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), Error>

impl ToJson for Timestamp

fn to_json(&self) -> Json

Derived Implementations

impl Debug for Timestamp

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for Timestamp

fn clone(&self) -> Timestamp

fn clone_from(&mut self, source: &Self)

impl Eq for Timestamp

fn assert_receiver_is_total_eq(&self)

impl PartialEq for Timestamp

fn eq(&self, __arg_0: &Timestamp) -> bool

fn ne(&self, __arg_0: &Timestamp) -> bool