Struct oxsdatatypes::GYearMonth
source · pub struct GYearMonth { /* private fields */ }
Expand description
XML Schema gYearMonth
datatype
It encodes the value using a number of seconds from the Gregorian calendar era using a Decimal
,
when combined with the day-time 31T00:00:00, and an optional timezone offset in minutes.
Implementations§
source§impl GYearMonth
impl GYearMonth
pub fn from_be_bytes(bytes: [u8; 18]) -> Self
pub fn year(&self) -> i64
pub fn month(&self) -> u8
pub fn timezone(&self) -> Option<DayTimeDuration>
pub fn timezone_offset(&self) -> Option<TimezoneOffset>
pub fn adjust(&self, timezone_offset: Option<TimezoneOffset>) -> Option<Self>
pub fn to_be_bytes(self) -> [u8; 18]
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 Clone for GYearMonth
impl Clone for GYearMonth
source§fn clone(&self) -> GYearMonth
fn clone(&self) -> GYearMonth
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 GYearMonth
impl Debug for GYearMonth
source§impl Display for GYearMonth
impl Display for GYearMonth
source§impl FromStr for GYearMonth
impl FromStr for GYearMonth
§type Err = XsdParseError
type Err = XsdParseError
The associated error which can be returned from parsing.
source§impl Hash for GYearMonth
impl Hash for GYearMonth
source§impl PartialEq<GYearMonth> for GYearMonth
impl PartialEq<GYearMonth> for GYearMonth
source§fn eq(&self, other: &GYearMonth) -> bool
fn eq(&self, other: &GYearMonth) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<GYearMonth> for GYearMonth
impl PartialOrd<GYearMonth> for GYearMonth
source§fn partial_cmp(&self, other: &GYearMonth) -> Option<Ordering>
fn partial_cmp(&self, other: &GYearMonth) -> 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 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 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<GYearMonth> for GMonth
impl TryFrom<GYearMonth> for GMonth
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§fn try_from(year_month: GYearMonth) -> Result<Self, DateTimeError>
fn try_from(year_month: GYearMonth) -> Result<Self, DateTimeError>
Performs the conversion.
source§impl TryFrom<GYearMonth> for GYear
impl TryFrom<GYearMonth> for GYear
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§fn try_from(year_month: GYearMonth) -> Result<Self, DateTimeError>
fn try_from(year_month: GYearMonth) -> Result<Self, DateTimeError>
Performs the conversion.
impl Copy for GYearMonth
impl Eq for GYearMonth
impl StructuralEq for GYearMonth
impl StructuralPartialEq for GYearMonth
Auto Trait Implementations§
impl RefUnwindSafe for GYearMonth
impl Send for GYearMonth
impl Sync for GYearMonth
impl Unpin for GYearMonth
impl UnwindSafe for GYearMonth
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