Skip to main content

PermitClock

Trait PermitClock 

Source
pub trait PermitClock {
    // Required method
    fn now(&self) -> PermitTimestamp;
}
Expand description

Time source sampled inside permit execution immediately before dispatch.

The SDK owns no clock. Implementations must provide trustworthy Unix time and must not move backward. Send-async execution additionally requires a Sync clock because the returned future may move between threads.

Required Methods§

Source

fn now(&self) -> PermitTimestamp

Returns the current caller-observed time.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F> PermitClock for F
where F: Fn() -> PermitTimestamp,