Skip to main content

Environment

Trait Environment 

Source
pub trait Environment: Sync {
    // Required methods
    fn now_ms(&self) -> u64;
    fn new_epoch(&self) -> String;
}
Expand description

Where the helper reads the time and draws new epochs.

Required Methods§

Source

fn now_ms(&self) -> u64

Unix time in milliseconds.

Source

fn new_epoch(&self) -> String

A fresh epoch: [a-z0-9]{1,16}, different from every earlier one with overwhelming probability.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§