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 const MAX: Self = _
pub const MIN: Self = _
pub fn new(seconds: impl Into<Decimal>) -> Self
pub fn from_be_bytes(bytes: [u8; 16]) -> Self
Sourcepub const fn as_seconds(self) -> Decimal
pub const fn as_seconds(self) -> Decimal
The duration in seconds.
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>
Returns None
in case of overflow (FODT0002
).
Sourcepub fn checked_sub(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_sub(self, rhs: impl Into<Self>) -> Option<Self>
Returns None
in case of overflow (FODT0002
).
Sourcepub fn checked_neg(self) -> Option<Self>
pub fn checked_neg(self) -> Option<Self>
Unary negation.
Returns None
in case of overflow (FODT0002
).
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
Source§impl Hash for DayTimeDuration
impl Hash 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 Duration
impl PartialEq<DayTimeDuration> for Duration
Source§impl PartialEq<DayTimeDuration> for YearMonthDuration
impl PartialEq<DayTimeDuration> for YearMonthDuration
Source§impl PartialEq<Duration> for DayTimeDuration
impl PartialEq<Duration> for DayTimeDuration
Source§impl PartialEq<YearMonthDuration> for DayTimeDuration
impl PartialEq<YearMonthDuration> for DayTimeDuration
Source§impl PartialEq for DayTimeDuration
impl PartialEq for DayTimeDuration
Source§impl PartialOrd<DayTimeDuration> for Duration
impl PartialOrd<DayTimeDuration> for Duration
Source§impl PartialOrd<DayTimeDuration> for YearMonthDuration
impl PartialOrd<DayTimeDuration> for YearMonthDuration
Source§impl PartialOrd<Duration> for DayTimeDuration
impl PartialOrd<Duration> for DayTimeDuration
Source§impl PartialOrd<YearMonthDuration> for DayTimeDuration
impl PartialOrd<YearMonthDuration> for DayTimeDuration
Source§impl PartialOrd for DayTimeDuration
impl PartialOrd for DayTimeDuration
Source§impl TryFrom<DayTimeDuration> for Duration
impl TryFrom<DayTimeDuration> for Duration
Source§type Error = DurationOverflowError
type Error = DurationOverflowError
The type returned in the event of a conversion error.
Source§impl TryFrom<DayTimeDuration> for TimezoneOffset
impl TryFrom<DayTimeDuration> for TimezoneOffset
Source§type Error = InvalidTimezoneError
type Error = InvalidTimezoneError
The type returned in the event of a conversion error.
Source§impl TryFrom<Duration> for DayTimeDuration
impl TryFrom<Duration> for DayTimeDuration
Source§impl TryFrom<Duration> for DayTimeDuration
impl TryFrom<Duration> for DayTimeDuration
Source§type Error = DurationOverflowError
type Error = DurationOverflowError
The type returned in the event of a conversion error.
impl Copy for DayTimeDuration
impl Eq for DayTimeDuration
impl StructuralPartialEq for DayTimeDuration
Auto Trait Implementations§
impl Freeze for DayTimeDuration
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