Struct rkyv::core_impl::time::ArchivedDuration [−][src]
An archived Duration
.
Implementations
impl ArchivedDuration
[src]
pub const fn as_secs(&self) -> u64
[src]
Returns the number of whole seconds contained by this
ArchivedDuration
.
The returned value does not include the fractional (nanosecond) part of the duration, which
can be obtained using subsec_nanos
.
pub const fn subsec_millis(&self) -> u32
[src]
Returns the fractional part of this ArchivedDuration
, in whole milliseconds.
This method does not return the length of the duration when represented by milliseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one thousand).
pub const fn subsec_micros(&self) -> u32
[src]
Returns the fractional part of this ArchivedDuration
, in whole microseconds.
This method does not return the length of the duration when represented by microseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one million).
pub const fn subsec_nanos(&self) -> u32
[src]
Returns the fractional part of this Duration
, in nanoseconds.
This method does not return the length of the duration when represented by nanoseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one billion).
pub const fn as_millis(&self) -> u128
[src]
Returns the total number of whole milliseconds contained by this ArchivedDuration
.
pub const fn as_micros(&self) -> u128
[src]
Returns the total number of whole microseconds contained by this ArchivedDuration
.
pub const fn as_nanos(&self) -> u128
[src]
Returns the total number of nanoseconds contained by this ArchivedDuration
.
pub fn as_secs_f64(&self) -> f64
[src]
Returns the number of seconds contained by this ArchivedDuration
as f64
.
The returned value does include the fractional (nanosecond) part of the duration.
pub fn as_secs_f32(&self) -> f32
[src]
Returns the number of seconds contained by this ArchivedDuration
as f32
.
The returned value does include the fractional (nanosecond) part of the duration.
Trait Implementations
impl Clone for ArchivedDuration
[src]
fn clone(&self) -> ArchivedDuration
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ArchivedDuration
[src]
impl Default for ArchivedDuration
[src]
fn default() -> ArchivedDuration
[src]
impl<D: Fallible + ?Sized> Deserialize<Duration, D> for ArchivedDuration
[src]
impl Eq for ArchivedDuration
[src]
impl Hash for ArchivedDuration
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for ArchivedDuration
[src]
fn cmp(&self, other: &ArchivedDuration) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<ArchivedDuration> for ArchivedDuration
[src]
fn eq(&self, other: &ArchivedDuration) -> bool
[src]
fn ne(&self, other: &ArchivedDuration) -> bool
[src]
impl PartialOrd<ArchivedDuration> for ArchivedDuration
[src]
fn partial_cmp(&self, other: &ArchivedDuration) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ArchivedDuration
[src]
impl StructuralPartialEq for ArchivedDuration
[src]
Auto Trait Implementations
impl RefUnwindSafe for ArchivedDuration
impl Send for ArchivedDuration
impl Sync for ArchivedDuration
impl Unpin for ArchivedDuration
impl UnwindSafe for ArchivedDuration
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ArchivePointee for T
[src]
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
[src]
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointee for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,