pub type UnixTimestamp = Timestamp<UnixEpoch>;Expand description
Represents a duration offset from the UNIX_EPOCH.
Aliased Type§
pub struct UnixTimestamp { /* private fields */ }Implementations§
Source§impl UnixTimestamp
impl UnixTimestamp
Source§impl UnixTimestamp
impl UnixTimestamp
Sourcepub const fn from_offset(offset: Duration) -> UnixTimestamp
pub const fn from_offset(offset: Duration) -> UnixTimestamp
Creates a new timestamp given the specified offset
Sourcepub const fn from_seconds(seconds: u32) -> UnixTimestamp
pub const fn from_seconds(seconds: u32) -> UnixTimestamp
Creates a new timestamp given the specified number of seconds
Sourcepub const fn from_seconds_f64(seconds: f64) -> UnixTimestamp
pub const fn from_seconds_f64(seconds: f64) -> UnixTimestamp
Creates a new timestamp given the specified number of fractional seconds
Trait Implementations§
Source§impl Default for UnixTimestamp
impl Default for UnixTimestamp
Source§impl From<&Date> for UnixTimestamp
impl From<&Date> for UnixTimestamp
Source§impl From<&UTCDateTime> for UnixTimestamp
impl From<&UTCDateTime> for UnixTimestamp
Source§fn from(value: &UTCDateTime) -> Self
fn from(value: &UTCDateTime) -> Self
Converts to this type from the input type.
Source§impl From<Duration> for UnixTimestamp
impl From<Duration> for UnixTimestamp
Source§impl From<JulianDayNumber<JulianEpoch>> for UnixTimestamp
impl From<JulianDayNumber<JulianEpoch>> for UnixTimestamp
Source§fn from(value: JulianDate) -> Self
fn from(value: JulianDate) -> Self
Converts to this type from the input type.
Source§impl From<UTCDateTime> for UnixTimestamp
impl From<UTCDateTime> for UnixTimestamp
Source§fn from(value: UTCDateTime) -> Self
fn from(value: UTCDateTime) -> Self
Converts to this type from the input type.