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: DayTimeDuration
pub const MIN: DayTimeDuration
pub fn new(seconds: impl Into<Decimal>) -> DayTimeDuration
pub fn from_be_bytes(bytes: [u8; 16]) -> DayTimeDuration
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<DayTimeDuration>,
) -> Result<DayTimeDuration, ThinError>
pub fn checked_add( self, rhs: impl Into<DayTimeDuration>, ) -> Result<DayTimeDuration, ThinError>
Returns Err
in case of overflow (FODT0002
).
Sourcepub fn checked_sub(
self,
rhs: impl Into<DayTimeDuration>,
) -> Result<DayTimeDuration, ThinError>
pub fn checked_sub( self, rhs: impl Into<DayTimeDuration>, ) -> Result<DayTimeDuration, ThinError>
Returns Err
in case of overflow (FODT0002
).
Sourcepub fn checked_neg(self) -> Result<DayTimeDuration, ThinError>
pub fn checked_neg(self) -> Result<DayTimeDuration, ThinError>
Unary negation.
Returns Err
in case of overflow (FODT0002
).
Sourcepub fn is_identical_with(self, other: DayTimeDuration) -> bool
pub fn is_identical_with(self, other: DayTimeDuration) -> 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 duplicate 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) -> Duration
fn from(value: DayTimeDuration) -> Duration
Converts to this type from the input type.
Source§impl<'data> From<DayTimeDuration> for TypedValueRef<'data>
impl<'data> From<DayTimeDuration> for TypedValueRef<'data>
Source§fn from(value: DayTimeDuration) -> TypedValueRef<'data>
fn from(value: DayTimeDuration) -> TypedValueRef<'data>
Converts to this type from the input type.
Source§impl From<TimezoneOffset> for DayTimeDuration
impl From<TimezoneOffset> for DayTimeDuration
Source§fn from(value: TimezoneOffset) -> DayTimeDuration
fn from(value: TimezoneOffset) -> DayTimeDuration
Converts to this type from the input type.
Source§impl FromStr for DayTimeDuration
impl FromStr for DayTimeDuration
Source§type Err = ParseDurationError
type Err = ParseDurationError
The associated error which can be returned from parsing.
Source§fn from_str(
input: &str,
) -> Result<DayTimeDuration, <DayTimeDuration as FromStr>::Err>
fn from_str( input: &str, ) -> Result<DayTimeDuration, <DayTimeDuration as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moreSource§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 TimezoneOffset
impl TryFrom<DayTimeDuration> for TimezoneOffset
Source§type Error = InvalidTimezoneError
type Error = InvalidTimezoneError
The type returned in the event of a conversion error.
Source§fn try_from(
value: DayTimeDuration,
) -> Result<TimezoneOffset, <TimezoneOffset as TryFrom<DayTimeDuration>>::Error>
fn try_from( value: DayTimeDuration, ) -> Result<TimezoneOffset, <TimezoneOffset as TryFrom<DayTimeDuration>>::Error>
Performs the conversion.
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.
Source§fn try_from(
value: Duration,
) -> Result<DayTimeDuration, <DayTimeDuration as TryFrom<Duration>>::Error>
fn try_from( value: Duration, ) -> Result<DayTimeDuration, <DayTimeDuration as TryFrom<Duration>>::Error>
Performs the conversion.
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.
Source§fn try_from(
value: Duration,
) -> Result<DayTimeDuration, <DayTimeDuration as TryFrom<Duration>>::Error>
fn try_from( value: Duration, ) -> Result<DayTimeDuration, <DayTimeDuration as TryFrom<Duration>>::Error>
Performs the conversion.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more