FromMillis

Trait FromMillis 

Source
pub trait FromMillis: Sized {
    // Required method
    fn from_millis(millis: u64) -> Result<Self, Error>;

    // Provided method
    fn from_milis(millis: u64) -> Self
       where Self: Sized { ... }
}

Required Methods§

Source

fn from_millis(millis: u64) -> Result<Self, Error>

Create protobuf timestamp from milliseconds since epoch

Note there is a resolution difference, as timestamp uses nanoseconds

§Arguments
  • millis - time since epoch, in milliseconds; must fit i64 type

Provided Methods§

Source

fn from_milis(millis: u64) -> Self
where Self: Sized,

👎Deprecated since 1.3.1: use from_millis instead

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§