Skip to main content

GenericNowFn

Trait GenericNowFn 

Source
pub trait GenericNowFn<T>:
    Clone
    + Send
    + Sync {
    // Required method
    fn now(&self) -> T;
}
Expand description

A NowFn that is generic over the timestamp.

The oracle operations work in terms of mz_repr::Timestamp and we could work around it by bridging between the two in the oracle implementation itself. This wrapper type makes that slightly easier, though.

Required Methods§

Source

fn now(&self) -> T

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl GenericNowFn<Timestamp> for NowFn<EpochMillis>

Source§

fn now(&self) -> Timestamp

Source§

impl<T: Clone + Send + Sync> GenericNowFn<T> for NowFn<T>

Source§

fn now(&self) -> T

Implementors§