[−][src]Struct sync15_traits::ServerTimestamp
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) -> Self
[src]
pub fn from_millis(ts: i64) -> Self
[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]
fn clone(&self) -> ServerTimestamp
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ServerTimestamp
[src]
impl Debug for ServerTimestamp
[src]
impl Default for ServerTimestamp
[src]
fn default() -> ServerTimestamp
[src]
impl<'de> Deserialize<'de> for ServerTimestamp
[src]
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
[src]
impl Display for ServerTimestamp
[src]
impl FromStr for ServerTimestamp
[src]
type Err = ParseFloatError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<ServerTimestamp> for ServerTimestamp
[src]
fn eq(&self, other: &ServerTimestamp) -> bool
[src]
fn ne(&self, other: &ServerTimestamp) -> bool
[src]
impl PartialOrd<ServerTimestamp> for ServerTimestamp
[src]
fn partial_cmp(&self, other: &ServerTimestamp) -> Option<Ordering>
[src]
fn lt(&self, other: &ServerTimestamp) -> bool
[src]
fn le(&self, other: &ServerTimestamp) -> bool
[src]
fn gt(&self, other: &ServerTimestamp) -> bool
[src]
fn ge(&self, other: &ServerTimestamp) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,