pub struct Timestamp(pub u64);
Tuple Fields§
§0: u64
Implementations§
Source§impl Timestamp
impl Timestamp
Sourcepub const EARLIEST: Timestamp = _
pub const EARLIEST: Timestamp = _
In desktop sync, bookmarks are clamped to Jan 23, 1993 (which is 727747200000) There’s no good reason history records could be older than that, so we do the same here (even though desktop’s history currently doesn’t) XXX - there’s probably a case to be made for this being, say, 5 years ago - then all requests earlier than that are collapsed into a single visit at this timestamp.
pub fn now() -> Self
Sourcepub fn duration_since(self, other: Timestamp) -> Option<Duration>
pub fn duration_since(self, other: Timestamp) -> Option<Duration>
Returns None if other
is later than self
(Duration may not represent
negative timespans in rust).
pub fn checked_sub(self, d: Duration) -> Option<Timestamp>
pub fn checked_add(self, d: Duration) -> Option<Timestamp>
pub fn as_millis(self) -> u64
pub fn as_millis_i64(self) -> i64
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Timestamp
impl<'de> Deserialize<'de> for Timestamp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SystemTime> for Timestamp
impl From<SystemTime> for Timestamp
Source§fn from(st: SystemTime) -> Self
fn from(st: SystemTime) -> Self
Converts to this type from the input type.
Source§impl From<Timestamp> for SystemTime
impl From<Timestamp> for SystemTime
Source§impl FromSql for Timestamp
impl FromSql for Timestamp
Source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
Source§impl Ord for Timestamp
impl Ord for Timestamp
Source§impl PartialOrd for Timestamp
impl PartialOrd for Timestamp
impl Copy for Timestamp
impl Eq for Timestamp
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.