Struct libsignal_protocol::Timestamp
source · pub struct Timestamp(/* private fields */);
Expand description
Timestamp recorded as milliseconds since the Unix epoch.
-Implementations§
source§impl Timestamp
impl Timestamp
pub const fn from_epoch_millis(milliseconds: u64) -> Self
pub const fn epoch_millis(&self) -> u64
pub fn add_millis(&self, milliseconds: u64) -> Self
pub fn sub_millis(&self, milliseconds: u64) -> Timestamp
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 Distribution<Timestamp> for Standard
impl Distribution<Timestamp> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Timestamp
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Timestamp
Generate a random value of
T
, using rng
as the source of randomness.source§fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>where
+
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>where
+
Implementations§
source§impl Timestamp
impl Timestamp
pub const fn from_epoch_millis(milliseconds: u64) -> Self
pub const fn epoch_millis(&self) -> u64
pub fn add_millis(&self, milliseconds: u64) -> Self
pub fn sub_millis(&self, milliseconds: u64) -> Timestamp
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 Distribution<Timestamp> for Standard
impl Distribution<Timestamp> for Standard
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§
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