Struct oxsdatatypes::DateTime
source · pub struct DateTime { /* private fields */ }
Expand description
It encodes the value using a number of seconds from the Gregorian calendar era using a Decimal
and an optional timezone offset in minutes.
Implementations§
source§impl DateTime
impl DateTime
sourcepub fn now() -> Result<Self, DateTimeError>
pub fn now() -> Result<Self, DateTimeError>
pub fn from_be_bytes(bytes: [u8; 18]) -> Self
sourcepub fn timezone(&self) -> Option<DayTimeDuration>
pub fn timezone(&self) -> Option<DayTimeDuration>
pub fn timezone_offset(&self) -> Option<TimezoneOffset>
pub fn to_be_bytes(self) -> [u8; 18]
sourcepub fn checked_sub(&self, rhs: impl Into<Self>) -> Option<DayTimeDuration>
pub fn checked_sub(&self, rhs: impl Into<Self>) -> Option<DayTimeDuration>
sourcepub fn checked_add_year_month_duration(
&self,
rhs: impl Into<YearMonthDuration>
) -> Option<Self>
pub fn checked_add_year_month_duration( &self, rhs: impl Into<YearMonthDuration> ) -> Option<Self>
sourcepub fn checked_add_day_time_duration(
&self,
rhs: impl Into<Duration>
) -> Option<Self>
pub fn checked_add_day_time_duration( &self, rhs: impl Into<Duration> ) -> Option<Self>
sourcepub fn checked_add_duration(&self, rhs: impl Into<Duration>) -> Option<Self>
pub fn checked_add_duration(&self, rhs: impl Into<Duration>) -> Option<Self>
sourcepub fn checked_sub_year_month_duration(
&self,
rhs: impl Into<YearMonthDuration>
) -> Option<Self>
pub fn checked_sub_year_month_duration( &self, rhs: impl Into<YearMonthDuration> ) -> Option<Self>
sourcepub fn checked_sub_day_time_duration(
&self,
rhs: impl Into<DayTimeDuration>
) -> Option<Self>
pub fn checked_sub_day_time_duration( &self, rhs: impl Into<DayTimeDuration> ) -> Option<Self>
sourcepub fn checked_sub_duration(&self, rhs: impl Into<Duration>) -> Option<Self>
pub fn checked_sub_duration(&self, rhs: impl Into<Duration>) -> Option<Self>
sourcepub fn adjust(&self, timezone_offset: Option<TimezoneOffset>) -> Option<Self>
pub fn adjust(&self, timezone_offset: Option<TimezoneOffset>) -> Option<Self>
sourcepub fn is_identical_with(&self, other: &Self) -> bool
pub fn is_identical_with(&self, other: &Self) -> bool
Checks if the two values are identical.
Trait Implementations§
source§impl FromStr for DateTime
impl FromStr for DateTime
§type Err = XsdParseError
type Err = XsdParseError
The associated error which can be returned from parsing.
source§impl PartialEq<DateTime> for DateTime
impl PartialEq<DateTime> for DateTime
source§impl PartialOrd<DateTime> for DateTime
impl PartialOrd<DateTime> for DateTime
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 TryFrom<Date> for DateTime
impl TryFrom<Date> for DateTime
Conversion according to XPath cast rules.
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§impl TryFrom<DateTime> for Date
impl TryFrom<DateTime> for Date
Conversion according to XPath cast rules.
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§impl TryFrom<DateTime> for GDay
impl TryFrom<DateTime> for GDay
Conversion according to XPath cast rules.
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§impl TryFrom<DateTime> for GMonth
impl TryFrom<DateTime> for GMonth
Conversion according to XPath cast rules.
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§impl TryFrom<DateTime> for GMonthDay
impl TryFrom<DateTime> for GMonthDay
Conversion according to XPath cast rules.
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§impl TryFrom<DateTime> for GYear
impl TryFrom<DateTime> for GYear
Conversion according to XPath cast rules.
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§impl TryFrom<DateTime> for GYearMonth
impl TryFrom<DateTime> for GYearMonth
Conversion according to XPath cast rules.
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§impl TryFrom<DateTime> for Time
impl TryFrom<DateTime> for Time
Conversion according to XPath cast rules.
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
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§
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