Trait TimeStamp

Source
pub trait TimeStamp {
    // Required method
    fn now() -> Self;
}
Expand description

Describes types that can be used for timestamping. This allows using the tracing facilities in no_std environments, where std::time::Instant is not available.

Required Methods§

Source

fn now() -> Self

Returns the current time

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TimeStamp for Instant

Source§

fn now() -> Self

Implementors§