pub struct DateTime {
pub micro: u32,
pub sec: u8,
pub min: u8,
pub hour: u8,
pub day: u8,
pub mon: u8,
pub year: u16,
}Expand description
Log timestamp type.
Parse using FromStr impl.
Format using the Display trait.
Convert timestamp into/from SytemTime to use.
Supports comparsion and sorting.
Fields
micro: u320…999999
sec: u80…59
min: u80…59
hour: u80…23
day: u81…31
mon: u81…12
year: u161970…9999
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for DateTime
impl<'de> Deserialize<'de> for DateTime
sourcefn 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
sourceimpl From<DateTime> for SystemTime
impl From<DateTime> for SystemTime
sourcefn from(v: DateTime) -> SystemTime
fn from(v: DateTime) -> SystemTime
Converts to this type from the input type.
sourceimpl From<SystemTime> for DateTime
impl From<SystemTime> for DateTime
sourcefn from(v: SystemTime) -> DateTime
fn from(v: SystemTime) -> DateTime
Converts to this type from the input type.
sourceimpl Ord for DateTime
impl Ord for DateTime
sourceimpl PartialOrd<DateTime> for DateTime
impl PartialOrd<DateTime> for DateTime
sourcefn partial_cmp(&self, other: &DateTime) -> Option<Ordering>
fn partial_cmp(&self, other: &DateTime) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn 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 more
impl Copy for DateTime
impl Eq for DateTime
impl StructuralEq for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more