[][src]Struct sync15::ServerTimestamp

pub struct ServerTimestamp(pub i64);

Typesafe way to manage server timestamps without accidentally mixing them up with local ones.

Implementations

impl ServerTimestamp[src]

pub fn from_float_seconds(ts: f64) -> ServerTimestamp[src]

pub fn from_millis(ts: i64) -> ServerTimestamp[src]

impl ServerTimestamp[src]

pub const EPOCH: ServerTimestamp[src]

pub fn duration_since(self, other: ServerTimestamp) -> Option<Duration>[src]

Returns None if other is later than self (Duration may not represent negative timespans in rust).

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

Get the milliseconds for the timestamp.

Trait Implementations

impl Clone for ServerTimestamp[src]

impl Copy for ServerTimestamp[src]

impl Debug for ServerTimestamp[src]

impl Default for ServerTimestamp[src]

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

impl Display for ServerTimestamp[src]

impl FromStr for ServerTimestamp[src]

type Err = ParseFloatError

The associated error which can be returned from parsing.

impl PartialEq<ServerTimestamp> for ServerTimestamp[src]

impl PartialOrd<ServerTimestamp> for ServerTimestamp[src]

impl Serialize for ServerTimestamp[src]

impl StructuralPartialEq for ServerTimestamp[src]

Auto Trait Implementations

impl RefUnwindSafe for ServerTimestamp

impl Send for ServerTimestamp

impl Sync for ServerTimestamp

impl Unpin for ServerTimestamp

impl UnwindSafe for ServerTimestamp

Blanket Implementations

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

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,