[][src]Trait metrics_core::AsNanoseconds

pub trait AsNanoseconds {
    fn as_nanos(&self) -> u64;
}

A value which can be converted into a nanosecond representation.

This trait allows us to interchangably accept raw integer time values, ones already in nanoseconds, as well as the more conventional Duration which is a result of getting the difference between two Instants.

Required methods

fn as_nanos(&self) -> u64

Loading content...

Implementations on Foreign Types

impl AsNanoseconds for u64[src]

impl AsNanoseconds for Duration[src]

Loading content...

Implementors

Loading content...