Struct oxsdatatypes::YearMonthDuration
source · pub struct YearMonthDuration { /* private fields */ }
Expand description
XML Schema yearMonthDuration
datatype
It stores the duration as a number of months encoded using a i64
.
Implementations§
source§impl YearMonthDuration
impl YearMonthDuration
pub fn new(months: impl Into<i64>) -> Self
pub fn from_be_bytes(bytes: [u8; 8]) -> Self
pub fn to_be_bytes(self) -> [u8; 8]
sourcepub fn checked_add(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_add(self, rhs: impl Into<Self>) -> Option<Self>
sourcepub fn checked_sub(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_sub(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_neg(&self) -> 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 Clone for YearMonthDuration
impl Clone for YearMonthDuration
source§fn clone(&self) -> YearMonthDuration
fn clone(&self) -> YearMonthDuration
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 YearMonthDuration
impl Debug for YearMonthDuration
source§impl Default for YearMonthDuration
impl Default for YearMonthDuration
source§fn default() -> YearMonthDuration
fn default() -> YearMonthDuration
Returns the “default value” for a type. Read more
source§impl Display for YearMonthDuration
impl Display for YearMonthDuration
source§impl From<YearMonthDuration> for Duration
impl From<YearMonthDuration> for Duration
source§fn from(value: YearMonthDuration) -> Self
fn from(value: YearMonthDuration) -> Self
Converts to this type from the input type.
source§impl FromStr for YearMonthDuration
impl FromStr for YearMonthDuration
§type Err = XsdParseError
type Err = XsdParseError
The associated error which can be returned from parsing.
source§impl Hash for YearMonthDuration
impl Hash for YearMonthDuration
source§impl Neg for YearMonthDuration
impl Neg for YearMonthDuration
source§impl Ord for YearMonthDuration
impl Ord for YearMonthDuration
source§fn cmp(&self, other: &YearMonthDuration) -> Ordering
fn cmp(&self, other: &YearMonthDuration) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<DayTimeDuration> for YearMonthDuration
impl PartialEq<DayTimeDuration> for YearMonthDuration
source§fn eq(&self, other: &DayTimeDuration) -> bool
fn eq(&self, other: &DayTimeDuration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<Duration> for YearMonthDuration
impl PartialEq<Duration> for YearMonthDuration
source§impl PartialEq<YearMonthDuration> for DayTimeDuration
impl PartialEq<YearMonthDuration> for DayTimeDuration
source§fn eq(&self, other: &YearMonthDuration) -> bool
fn eq(&self, other: &YearMonthDuration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<YearMonthDuration> for Duration
impl PartialEq<YearMonthDuration> for Duration
source§fn eq(&self, other: &YearMonthDuration) -> bool
fn eq(&self, other: &YearMonthDuration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<YearMonthDuration> for YearMonthDuration
impl PartialEq<YearMonthDuration> for YearMonthDuration
source§fn eq(&self, other: &YearMonthDuration) -> bool
fn eq(&self, other: &YearMonthDuration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<DayTimeDuration> for YearMonthDuration
impl PartialOrd<DayTimeDuration> for YearMonthDuration
source§fn partial_cmp(&self, other: &DayTimeDuration) -> Option<Ordering>
fn partial_cmp(&self, other: &DayTimeDuration) -> 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<Duration> for YearMonthDuration
impl PartialOrd<Duration> for YearMonthDuration
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<YearMonthDuration> for DayTimeDuration
impl PartialOrd<YearMonthDuration> for DayTimeDuration
source§fn partial_cmp(&self, other: &YearMonthDuration) -> Option<Ordering>
fn partial_cmp(&self, other: &YearMonthDuration) -> 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<YearMonthDuration> for Duration
impl PartialOrd<YearMonthDuration> for Duration
source§fn partial_cmp(&self, other: &YearMonthDuration) -> Option<Ordering>
fn partial_cmp(&self, other: &YearMonthDuration) -> 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<YearMonthDuration> for YearMonthDuration
impl PartialOrd<YearMonthDuration> for YearMonthDuration
source§fn partial_cmp(&self, other: &YearMonthDuration) -> Option<Ordering>
fn partial_cmp(&self, other: &YearMonthDuration) -> 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<Duration> for YearMonthDuration
impl TryFrom<Duration> for YearMonthDuration
§type Error = DecimalOverflowError
type Error = DecimalOverflowError
The type returned in the event of a conversion error.
impl Copy for YearMonthDuration
impl Eq for YearMonthDuration
impl StructuralEq for YearMonthDuration
impl StructuralPartialEq for YearMonthDuration
Auto Trait Implementations§
impl RefUnwindSafe for YearMonthDuration
impl Send for YearMonthDuration
impl Sync for YearMonthDuration
impl Unpin for YearMonthDuration
impl UnwindSafe for YearMonthDuration
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