Skip to main content

SystemTimeExt

Trait SystemTimeExt 

Source
pub trait SystemTimeExt: Sealed {
    // Required method
    fn get() -> SystemTime;
}
Expand description

Extension trait for std::time::SystemTime

This trait adds a get method which works like now, but also supports wasm32-unknown-unknown environments.

Required Methods§

Source

fn get() -> SystemTime

Return 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.

Implementors§