Struct rkyv::core_impl::time::ArchivedDuration[][src]

pub struct ArchivedDuration { /* fields omitted */ }

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]

impl Copy for ArchivedDuration[src]

impl Default for ArchivedDuration[src]

impl<D: Fallible + ?Sized> Deserialize<Duration, D> for ArchivedDuration[src]

impl Eq for ArchivedDuration[src]

impl Hash for ArchivedDuration[src]

impl Ord for ArchivedDuration[src]

impl PartialEq<ArchivedDuration> for ArchivedDuration[src]

impl PartialOrd<ArchivedDuration> for ArchivedDuration[src]

impl StructuralEq for ArchivedDuration[src]

impl StructuralPartialEq for ArchivedDuration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ArchivePointee for T[src]

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointee for T[src]

type Metadata = ()

The type for metadata in pointers and references to Self.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.