Struct oxsdatatypes::Date
source · pub struct Date { /* private fields */ }
Expand description
It encodes the value using a number of seconds from the Gregorian calendar era using a Decimal
,
when combined with the time 00:00:00, and an optional timezone offset in minutes.
Implementations§
source§impl Date
impl Date
pub fn from_be_bytes(bytes: [u8; 18]) -> Self
sourcepub fn now() -> Result<Self, DateTimeError>
pub fn now() -> Result<Self, DateTimeError>
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<DayTimeDuration>
) -> Option<Self>
pub fn checked_add_day_time_duration( &self, rhs: impl Into<DayTimeDuration> ) -> 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>
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 Date
impl FromStr for Date
§type Err = XsdParseError
type Err = XsdParseError
The associated error which can be returned from parsing.
source§impl PartialEq<Date> for Date
impl PartialEq<Date> for Date
source§impl PartialOrd<Date> for Date
impl PartialOrd<Date> for Date
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<Date> for GDay
impl TryFrom<Date> 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<Date> for GMonth
impl TryFrom<Date> 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<Date> for GMonthDay
impl TryFrom<Date> 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<Date> for GYear
impl TryFrom<Date> 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<Date> for GYearMonth
impl TryFrom<Date> 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 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.
impl Copy for Date
impl Eq for Date
impl StructuralEq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
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