Struct xsd_types::value::DateTimeStamp
source · pub struct DateTimeStamp { /* private fields */ }Implementations§
source§impl DateTimeStamp
impl DateTimeStamp
pub fn new(date_time: NaiveDateTime, offset: FixedOffset) -> Self
sourcepub fn now_ms() -> Self
pub fn now_ms() -> Self
Returns a DateTimeStamp which corresponds to the current time and
date, with millisecond precision (at most).
pub fn into_string(self) -> String
sourcepub fn to_chrono_date_time(&self) -> DateTime<FixedOffset>
pub fn to_chrono_date_time(&self) -> DateTime<FixedOffset>
Converts this DateTimeStamp to a chrono::DateTime<FixedOffset>.
Trait Implementations§
source§impl Clone for DateTimeStamp
impl Clone for DateTimeStamp
source§fn clone(&self) -> DateTimeStamp
fn clone(&self) -> DateTimeStamp
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 DateTimeStamp
impl Debug for DateTimeStamp
source§impl Display for DateTimeStamp
impl Display for DateTimeStamp
source§impl From<DateTime<FixedOffset>> for DateTimeStamp
impl From<DateTime<FixedOffset>> for DateTimeStamp
source§fn from(value: DateTime<FixedOffset>) -> Self
fn from(value: DateTime<FixedOffset>) -> Self
Converts to this type from the input type.
source§impl From<DateTimeStamp> for DateTime<FixedOffset>
impl From<DateTimeStamp> for DateTime<FixedOffset>
source§fn from(value: DateTimeStamp) -> Self
fn from(value: DateTimeStamp) -> Self
Converts to this type from the input type.
source§impl From<DateTimeStamp> for DateTime<Utc>
impl From<DateTimeStamp> for DateTime<Utc>
source§fn from(value: DateTimeStamp) -> Self
fn from(value: DateTimeStamp) -> Self
Converts to this type from the input type.
source§impl FromStr for DateTimeStamp
impl FromStr for DateTimeStamp
source§impl Hash for DateTimeStamp
impl Hash for DateTimeStamp
source§impl LexicalFormOf<DateTimeStamp> for DateTimeStamp
impl LexicalFormOf<DateTimeStamp> for DateTimeStamp
type ValueError = InvalidDateTimeStampValue
fn try_as_value(&self) -> Result<DateTimeStamp, Self::ValueError>
source§impl Ord for DateTimeStamp
impl Ord for DateTimeStamp
source§impl ParseXsd for DateTimeStamp
impl ParseXsd for DateTimeStamp
type LexicalForm = DateTimeStamp
fn parse_xsd(lexical_value: &str) -> ParseXsdResult<Self, Self::LexicalForm>
source§impl<Tz: TimeZone> PartialEq<DateTime<Tz>> for DateTimeStamp
impl<Tz: TimeZone> PartialEq<DateTime<Tz>> for DateTimeStamp
source§impl<Tz: TimeZone> PartialEq<DateTimeStamp> for DateTime<Tz>
impl<Tz: TimeZone> PartialEq<DateTimeStamp> for DateTime<Tz>
source§fn eq(&self, other: &DateTimeStamp) -> bool
fn eq(&self, other: &DateTimeStamp) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialEq for DateTimeStamp
impl PartialEq for DateTimeStamp
source§impl<Tz: TimeZone> PartialOrd<DateTime<Tz>> for DateTimeStamp
impl<Tz: TimeZone> PartialOrd<DateTime<Tz>> for DateTimeStamp
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<Tz: TimeZone> PartialOrd<DateTimeStamp> for DateTime<Tz>
impl<Tz: TimeZone> PartialOrd<DateTimeStamp> for DateTime<Tz>
source§fn partial_cmp(&self, other: &DateTimeStamp) -> Option<Ordering>
fn partial_cmp(&self, other: &DateTimeStamp) -> 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 PartialOrd for DateTimeStamp
impl PartialOrd for DateTimeStamp
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 XsdValue for DateTimeStamp
impl XsdValue for DateTimeStamp
impl Copy for DateTimeStamp
impl Eq for DateTimeStamp
Auto Trait Implementations§
impl Freeze for DateTimeStamp
impl RefUnwindSafe for DateTimeStamp
impl Send for DateTimeStamp
impl Sync for DateTimeStamp
impl Unpin for DateTimeStamp
impl UnwindSafe for DateTimeStamp
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