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§impl PartialOrd for LongDateTime
impl PartialOrd for LongDateTime
source§impl Scalar for LongDateTime
impl Scalar 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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