pub struct DateTimeStamp {
pub date_time: NaiveDateTime,
pub offset: FixedOffset,
}Fields§
§date_time: NaiveDateTime§offset: FixedOffsetImplementations§
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 duplicate 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 PartialEq for DateTimeStamp
impl PartialEq for DateTimeStamp
Source§impl<Tz: TimeZone> PartialOrd<DateTime<Tz>> for DateTimeStamp
impl<Tz: TimeZone> PartialOrd<DateTime<Tz>> for DateTimeStamp
Source§impl<Tz: TimeZone> PartialOrd<DateTimeStamp> for DateTime<Tz>
impl<Tz: TimeZone> PartialOrd<DateTimeStamp> for DateTime<Tz>
Source§impl PartialOrd for DateTimeStamp
impl PartialOrd for DateTimeStamp
Source§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