pub trait TimeTagged {
    // Required methods
    fn epoch(&self) -> Epoch;
    fn set_epoch(&mut self, epoch: Epoch);

    // Provided method
    fn shift_by(&mut self, duration: Duration) { ... }
}
Expand description

A trait allowing for something to have an epoch

Required Methods§

source

fn epoch(&self) -> Epoch

Retrieve the Epoch

source

fn set_epoch(&mut self, epoch: Epoch)

Set the Epoch

Provided Methods§

source

fn shift_by(&mut self, duration: Duration)

Shift this epoch by a duration (can be negative)

Implementors§