Struct font_types::LongDateTime
source · 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 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§fn eq(&self, other: &LongDateTime) -> bool
fn eq(&self, other: &LongDateTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LongDateTime
impl PartialOrd for LongDateTime
source§fn partial_cmp(&self, other: &LongDateTime) -> Option<Ordering>
fn partial_cmp(&self, other: &LongDateTime) -> 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 Scalar for LongDateTime
impl Scalar 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> 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