Skip to main content

Rewind

Trait Rewind 

Source
pub trait Rewind: From<Time> {
    // Required method
    fn rewind(&self, slack: Self) -> Self;
}
Expand description

Extension trait for timestamp types that can be safely re-wound to an earlier time. This is required for automatically advancing traces according to their configured slack.

Required Methods§

Source

fn rewind(&self, slack: Self) -> Self

Returns a new timestamp corresponding to self rewound by the specified amount of slack. Calling rewind is always safe, in that no invalid times will be returned.

e.g. 0.rewind(10) -> 0 and Duration(0).rewind(Duration(1)) -> Duration(0)

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 Rewind for Duration

Source§

fn rewind(&self, slack: Self) -> Self

Source§

impl Rewind for u64

Source§

fn rewind(&self, slack: Self) -> Self

Implementors§