pub struct LongDateTime(/* private fields */);
Expand description
A simple datetime type.
This represented as a number of seconds since 12:00 midnight, January 1, 1904, UTC.
Implementations§
Source§impl LongDateTime
impl LongDateTime
Sourcepub const fn new(secs: i64) -> Self
pub const fn new(secs: i64) -> Self
Create with a number of seconds relative to 1904-01-01 00:00.
Sourcepub const fn as_secs(&self) -> i64
pub const fn as_secs(&self) -> i64
The number of seconds since 00:00 1904-01-01, UTC.
This can be a negative number, which presumably represents a date prior to the reference date.
Sourcepub const fn to_be_bytes(self) -> [u8; 8]
pub const fn to_be_bytes(self) -> [u8; 8]
The representation of this datetime as a big-endian byte array.
Trait Implementations§
Source§impl Clone for LongDateTime
impl Clone for LongDateTime
Source§fn clone(&self) -> LongDateTime
fn clone(&self) -> LongDateTime
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 LongDateTime
impl Debug for LongDateTime
Source§impl Default for LongDateTime
impl Default for LongDateTime
Source§fn default() -> LongDateTime
fn default() -> LongDateTime
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LongDateTime
impl<'de> Deserialize<'de> for LongDateTime
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 Hash for LongDateTime
impl Hash for LongDateTime
Source§impl Ord for LongDateTime
impl Ord for LongDateTime
Source§fn cmp(&self, other: &LongDateTime) -> Ordering
fn cmp(&self, other: &LongDateTime) -> 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 for LongDateTime
impl PartialEq for LongDateTime
Source§impl PartialOrd for LongDateTime
impl PartialOrd for LongDateTime
Source§impl Scalar for LongDateTime
impl Scalar for LongDateTime
Source§impl Serialize for LongDateTime
impl Serialize for LongDateTime
impl AnyBitPattern for LongDateTime
impl Copy for LongDateTime
impl Eq for LongDateTime
impl StructuralPartialEq for LongDateTime
Auto Trait Implementations§
impl Freeze for LongDateTime
impl RefUnwindSafe for LongDateTime
impl Send for LongDateTime
impl Sync for LongDateTime
impl Unpin for LongDateTime
impl UnwindSafe for LongDateTime
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FixedSize for Twhere
T: Scalar,
impl<T> FixedSize for Twhere
T: Scalar,
Source§const RAW_BYTE_LEN: usize = const RAW_BYTE_LEN: usize = std::mem::size_of::<T::Raw>();
const RAW_BYTE_LEN: usize = const RAW_BYTE_LEN: usize = std::mem::size_of::<T::Raw>();
The raw size of this type, in bytes. Read more