Struct oxsdatatypes::DayTimeDuration
source · pub struct DayTimeDuration { /* private fields */ }
Expand description
XML Schema dayTimeDuration
datatype
It stores the duration as a number of seconds encoded using a Decimal
.
Implementations§
source§impl DayTimeDuration
impl DayTimeDuration
pub fn new(seconds: impl Into<Decimal>) -> Self
pub fn from_be_bytes(bytes: [u8; 16]) -> Self
pub fn to_be_bytes(self) -> [u8; 16]
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 DayTimeDuration
impl Clone for DayTimeDuration
source§fn clone(&self) -> DayTimeDuration
fn clone(&self) -> DayTimeDuration
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 DayTimeDuration
impl Debug for DayTimeDuration
source§impl Default for DayTimeDuration
impl Default for DayTimeDuration
source§fn default() -> DayTimeDuration
fn default() -> DayTimeDuration
Returns the “default value” for a type. Read more
source§impl Display for DayTimeDuration
impl Display for DayTimeDuration
source§impl From<DayTimeDuration> for Duration
impl From<DayTimeDuration> for Duration
source§fn from(value: DayTimeDuration) -> Self
fn from(value: DayTimeDuration) -> Self
Converts to this type from the input type.
source§impl From<TimezoneOffset> for DayTimeDuration
impl From<TimezoneOffset> for DayTimeDuration
source§fn from(value: TimezoneOffset) -> Self
fn from(value: TimezoneOffset) -> Self
Converts to this type from the input type.
source§impl FromStr for DayTimeDuration
impl FromStr for DayTimeDuration
§type Err = XsdParseError
type Err = XsdParseError
The associated error which can be returned from parsing.
source§impl Hash for DayTimeDuration
impl Hash for DayTimeDuration
source§impl Neg for DayTimeDuration
impl Neg for DayTimeDuration
source§impl Ord for DayTimeDuration
impl Ord for DayTimeDuration
source§fn cmp(&self, other: &DayTimeDuration) -> Ordering
fn cmp(&self, other: &DayTimeDuration) -> 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 DayTimeDuration
impl PartialEq<DayTimeDuration> for DayTimeDuration
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<DayTimeDuration> for Duration
impl PartialEq<DayTimeDuration> for Duration
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<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 DayTimeDuration
impl PartialEq<Duration> for DayTimeDuration
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 PartialOrd<DayTimeDuration> for DayTimeDuration
impl PartialOrd<DayTimeDuration> for DayTimeDuration
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<DayTimeDuration> for Duration
impl PartialOrd<DayTimeDuration> for Duration
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<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 DayTimeDuration
impl PartialOrd<Duration> for DayTimeDuration
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 TryFrom<DayTimeDuration> for TimezoneOffset
impl TryFrom<DayTimeDuration> for TimezoneOffset
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
source§fn try_from(value: DayTimeDuration) -> Result<Self, DateTimeError>
fn try_from(value: DayTimeDuration) -> Result<Self, DateTimeError>
Performs the conversion.
source§impl TryFrom<Duration> for DayTimeDuration
impl TryFrom<Duration> for DayTimeDuration
§type Error = DecimalOverflowError
type Error = DecimalOverflowError
The type returned in the event of a conversion error.
source§impl TryFrom<Duration> for DayTimeDuration
impl TryFrom<Duration> for DayTimeDuration
§type Error = DecimalOverflowError
type Error = DecimalOverflowError
The type returned in the event of a conversion error.
source§fn try_from(value: StdDuration) -> Result<Self, DecimalOverflowError>
fn try_from(value: StdDuration) -> Result<Self, DecimalOverflowError>
Performs the conversion.
impl Copy for DayTimeDuration
impl Eq for DayTimeDuration
impl StructuralEq for DayTimeDuration
impl StructuralPartialEq for DayTimeDuration
Auto Trait Implementations§
impl RefUnwindSafe for DayTimeDuration
impl Send for DayTimeDuration
impl Sync for DayTimeDuration
impl Unpin for DayTimeDuration
impl UnwindSafe for DayTimeDuration
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