Struct swiss_army_knife::time::U31SecondsDuration
source · [−]pub struct U31SecondsDuration(_);
Expand description
A duration in seconds, with a maximum value of (i32::MAX as u32)
.
Usage is discoraged except for compatibility with legacy code.
Implementations
sourceimpl U31SecondsDuration
impl U31SecondsDuration
sourcepub const InclusiveMinimum: Self = Self::Zero
pub const InclusiveMinimum: Self = Self::Zero
Inclusive maximum (same as Zero).
sourcepub const InclusiveMaximum: Self = Self(i32::MAX as u32)
pub const InclusiveMaximum: Self = Self(i32::MAX as u32)
Inclusive minimum.
sourcepub const fn into_rust_duration(self) -> Duration
pub const fn into_rust_duration(self) -> Duration
Into Rust Duration
(as opposed to chrono
crate’s Duration
).
Trait Implementations
sourceimpl Add<U31SecondsDuration> for NanosecondsSinceUnixEpoch
impl Add<U31SecondsDuration> for NanosecondsSinceUnixEpoch
type Output = NanosecondsSinceUnixEpoch
type Output = NanosecondsSinceUnixEpoch
The resulting type after applying the +
operator.
sourcefn add(self, lhs: U31SecondsDuration) -> Self::Output
fn add(self, lhs: U31SecondsDuration) -> Self::Output
Performs the +
operation. Read more
sourceimpl Clone for U31SecondsDuration
impl Clone for U31SecondsDuration
sourcefn clone(&self) -> U31SecondsDuration
fn clone(&self) -> U31SecondsDuration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for U31SecondsDuration
impl Debug for U31SecondsDuration
sourceimpl Default for U31SecondsDuration
impl Default for U31SecondsDuration
sourcefn default() -> U31SecondsDuration
fn default() -> U31SecondsDuration
Returns the “default value” for a type. Read more
sourceimpl Hash for U31SecondsDuration
impl Hash for U31SecondsDuration
sourceimpl Into<Duration> for U31SecondsDuration
impl Into<Duration> for U31SecondsDuration
sourceimpl Into<u32> for U31SecondsDuration
impl Into<u32> for U31SecondsDuration
sourceimpl Ord for U31SecondsDuration
impl Ord for U31SecondsDuration
sourceimpl PartialEq<U31SecondsDuration> for U31SecondsDuration
impl PartialEq<U31SecondsDuration> for U31SecondsDuration
sourcefn eq(&self, other: &U31SecondsDuration) -> bool
fn eq(&self, other: &U31SecondsDuration) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &U31SecondsDuration) -> bool
fn ne(&self, other: &U31SecondsDuration) -> bool
This method tests for !=
.
sourceimpl PartialOrd<U31SecondsDuration> for U31SecondsDuration
impl PartialOrd<U31SecondsDuration> for U31SecondsDuration
sourcefn partial_cmp(&self, other: &U31SecondsDuration) -> Option<Ordering>
fn partial_cmp(&self, other: &U31SecondsDuration) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl TryFrom<[u8; 4]> for U31SecondsDuration
impl TryFrom<[u8; 4]> for U31SecondsDuration
type Error = ParseNumberError
type Error = ParseNumberError
The type returned in the event of a conversion error.
sourcefn try_from(value: BigEndianU32) -> Result<Self, Self::Error>
fn try_from(value: BigEndianU32) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<u32> for U31SecondsDuration
impl TryFrom<u32> for U31SecondsDuration
impl Copy for U31SecondsDuration
impl Eq for U31SecondsDuration
impl StructuralEq for U31SecondsDuration
impl StructuralPartialEq for U31SecondsDuration
Auto Trait Implementations
impl RefUnwindSafe for U31SecondsDuration
impl Send for U31SecondsDuration
impl Sync for U31SecondsDuration
impl Unpin for U31SecondsDuration
impl UnwindSafe for U31SecondsDuration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more