Struct fastobo::ast::NaiveDateTime
source · pub struct NaiveDateTime { /* private fields */ }
Expand description
A naive datetime, as found in header frames.
For historical reasons, OBO headers do not contain ISO datetimes but day-month-year dates, which can be confusing for US-based users.
Implementations§
source§impl NaiveDateTime
impl NaiveDateTime
Trait Implementations§
source§impl Clone for NaiveDateTime
impl Clone for NaiveDateTime
source§fn clone(&self) -> NaiveDateTime
fn clone(&self) -> NaiveDateTime
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 Date for NaiveDateTime
impl Date for NaiveDateTime
source§impl DateTime for NaiveDateTime
impl DateTime for NaiveDateTime
source§fn to_xsd_datetime(&self) -> String
fn to_xsd_datetime(&self) -> String
Generate an XML Schema datetime serialization of the NaiveDateTime
.
Note
While NaiveDateTime
structs do not store seconds, the xsd:dateTime
format requires all components to be present in the serialization, so
the date is initialized with seconds set to 0
.
source§impl Debug for NaiveDateTime
impl Debug for NaiveDateTime
source§impl Display for NaiveDateTime
impl Display for NaiveDateTime
source§impl<'i> FromPair<'i> for NaiveDateTime
impl<'i> FromPair<'i> for NaiveDateTime
source§impl FromStr for NaiveDateTime
impl FromStr for NaiveDateTime
source§impl Hash for NaiveDateTime
impl Hash for NaiveDateTime
source§impl Ord for NaiveDateTime
impl Ord for NaiveDateTime
source§fn cmp(&self, other: &NaiveDateTime) -> Ordering
fn cmp(&self, other: &NaiveDateTime) -> 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<NaiveDateTime> for NaiveDateTime
impl PartialEq<NaiveDateTime> for NaiveDateTime
source§fn eq(&self, other: &NaiveDateTime) -> bool
fn eq(&self, other: &NaiveDateTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<NaiveDateTime> for NaiveDateTime
impl PartialOrd<NaiveDateTime> for NaiveDateTime
source§fn partial_cmp(&self, other: &NaiveDateTime) -> Option<Ordering>
fn partial_cmp(&self, other: &NaiveDateTime) -> 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 Time for NaiveDateTime
impl Time for NaiveDateTime
impl Eq for NaiveDateTime
impl StructuralEq for NaiveDateTime
impl StructuralPartialEq for NaiveDateTime
Auto Trait Implementations§
impl RefUnwindSafe for NaiveDateTime
impl Send for NaiveDateTime
impl Sync for NaiveDateTime
impl Unpin for NaiveDateTime
impl UnwindSafe for NaiveDateTime
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