Struct jormungandr_lib::time::SecondsSinceUnixEpoch
source · pub struct SecondsSinceUnixEpoch(pub(crate) u64);
Expand description
time in seconds since [UNIX Epoch]
This type is meant to be easily converted between SystemTime
Example
let time = SystemTime::from(SecondsSinceUnixEpoch::MAX);
println!("max allowed time: {}", time);
// max allowed time: 4147-08-20T07:32:15+00:00
Tuple Fields§
§0: u64
Implementations§
Trait Implementations§
source§impl Clone for SecondsSinceUnixEpoch
impl Clone for SecondsSinceUnixEpoch
source§fn clone(&self) -> SecondsSinceUnixEpoch
fn clone(&self) -> SecondsSinceUnixEpoch
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SecondsSinceUnixEpoch
impl Debug for SecondsSinceUnixEpoch
source§impl Default for SecondsSinceUnixEpoch
impl Default for SecondsSinceUnixEpoch
source§fn default() -> SecondsSinceUnixEpoch
fn default() -> SecondsSinceUnixEpoch
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SecondsSinceUnixEpoch
impl<'de> Deserialize<'de> for SecondsSinceUnixEpoch
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 Display for SecondsSinceUnixEpoch
impl Display for SecondsSinceUnixEpoch
source§impl From<SecondsSinceUnixEpoch> for SystemTime
impl From<SecondsSinceUnixEpoch> for SystemTime
source§fn from(seconds: SecondsSinceUnixEpoch) -> SystemTime
fn from(seconds: SecondsSinceUnixEpoch) -> SystemTime
Converts to this type from the input type.
source§impl From<SystemTime> for SecondsSinceUnixEpoch
impl From<SystemTime> for SecondsSinceUnixEpoch
source§fn from(system_time: SystemTime) -> SecondsSinceUnixEpoch
fn from(system_time: SystemTime) -> SecondsSinceUnixEpoch
Converts to this type from the input type.
source§impl From<SystemTime> for SecondsSinceUnixEpoch
impl From<SystemTime> for SecondsSinceUnixEpoch
source§fn from(system_time: SystemTime) -> Self
fn from(system_time: SystemTime) -> Self
Converts to this type from the input type.
source§impl FromStr for SecondsSinceUnixEpoch
impl FromStr for SecondsSinceUnixEpoch
source§impl Hash for SecondsSinceUnixEpoch
impl Hash for SecondsSinceUnixEpoch
source§impl Ord for SecondsSinceUnixEpoch
impl Ord for SecondsSinceUnixEpoch
source§fn cmp(&self, other: &SecondsSinceUnixEpoch) -> Ordering
fn cmp(&self, other: &SecondsSinceUnixEpoch) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<SecondsSinceUnixEpoch> for SecondsSinceUnixEpoch
impl PartialEq<SecondsSinceUnixEpoch> for SecondsSinceUnixEpoch
source§fn eq(&self, other: &SecondsSinceUnixEpoch) -> bool
fn eq(&self, other: &SecondsSinceUnixEpoch) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SecondsSinceUnixEpoch> for SecondsSinceUnixEpoch
impl PartialOrd<SecondsSinceUnixEpoch> for SecondsSinceUnixEpoch
source§fn partial_cmp(&self, other: &SecondsSinceUnixEpoch) -> Option<Ordering>
fn partial_cmp(&self, other: &SecondsSinceUnixEpoch) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for SecondsSinceUnixEpoch
impl Serialize for SecondsSinceUnixEpoch
impl Copy for SecondsSinceUnixEpoch
impl Eq for SecondsSinceUnixEpoch
impl StructuralEq for SecondsSinceUnixEpoch
impl StructuralPartialEq for SecondsSinceUnixEpoch
Auto Trait Implementations§
impl RefUnwindSafe for SecondsSinceUnixEpoch
impl Send for SecondsSinceUnixEpoch
impl Sync for SecondsSinceUnixEpoch
impl Unpin for SecondsSinceUnixEpoch
impl UnwindSafe for SecondsSinceUnixEpoch
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