Trait glissade::TimeDiff

source ·
pub trait TimeDiff:
    Default
    + PartialEq
    + PartialOrd
    + Clone
    + Copy {
    // Required methods
    fn as_f32(self) -> f32;
    fn add(self, other: Self) -> Self;
    fn sub(self, other: Self) -> Self;
    fn scale(self, scale: f32) -> Self;
}
Expand description

Positive time difference

Required Methods§

source

fn as_f32(self) -> f32

source

fn add(self, other: Self) -> Self

source

fn sub(self, other: Self) -> Self

Panics if self < other

source

fn scale(self, scale: f32) -> Self

Panics if scale < 0.0

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TimeDiff for f32

source§

fn as_f32(self) -> f32

source§

fn add(self, other: f32) -> f32

source§

fn sub(self, other: f32) -> f32

source§

fn scale(self, scale: f32) -> f32

source§

impl TimeDiff for f64

source§

fn as_f32(self) -> f32

source§

fn add(self, other: f64) -> f64

source§

fn sub(self, other: f64) -> f64

source§

fn scale(self, scale: f32) -> f64

source§

impl TimeDiff for Duration

source§

fn as_f32(self) -> f32

source§

fn add(self, other: Self) -> Self

source§

fn sub(self, other: Self) -> Self

source§

fn scale(self, scale: f32) -> Self

Implementors§