#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "bytemuck", derive(bytemuck::AnyBitPattern))]
#[repr(transparent)]
pub struct LongDateTime(i64);
impl LongDateTime {
pub const fn new(secs: i64) -> Self {
Self(secs)
}
pub const fn as_secs(&self) -> i64 {
self.0
}
pub const fn to_be_bytes(self) -> [u8; 8] {
self.0.to_be_bytes()
}
}
crate::newtype_scalar!(LongDateTime, [u8; 8]);