Skip to main content

TimeUnit

Trait TimeUnit 

Source
pub trait TimeUnit: Sealed {
    type Repr: Copy + Clone + PartialEq + PartialOrd + Eq + Ord + Debug;

    const ZERO: Self::Repr;
}
Expand description

A trait for time units.

Required Associated Constants§

Source

const ZERO: Self::Repr

The zero value of Self::Repr.

Required Associated Types§

Source

type Repr: Copy + Clone + PartialEq + PartialOrd + Eq + Ord + Debug

The underlying representation of the time unit.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl TimeUnit for Jiffy

Source§

const ZERO: Self::Repr = 0

Source§

type Repr = isize

Source§

impl TimeUnit for Nsec

Source§

const ZERO: Self::Repr = 0

Source§

type Repr = i64