time_core::convert::sealed

Trait Per

Source
pub trait Per<T> {
    type Output;

    const VALUE: Self::Output;
}
Expand description

A trait for defining the ratio of two units of time.

This trait is used to implement the per method on the various structs.

Required Associated Constants§

Source

const VALUE: Self::Output

The number of one unit of time in the other.

Required Associated Types§

Source

type Output

The smallest unsigned integer type that can represent VALUE.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Per<Day> for Day

Source§

const VALUE: u8 = 1u8

Source§

type Output = u8

Source§

impl Per<Day> for Hour

Source§

const VALUE: u8 = 24u8

Source§

type Output = u8

Source§

impl Per<Day> for Microsecond

Source§

const VALUE: u64 = 86_400_000_000u64

Source§

type Output = u64

Source§

impl Per<Day> for Millisecond

Source§

const VALUE: u32 = 86_400_000u32

Source§

type Output = u32

Source§

impl Per<Day> for Minute

Source§

const VALUE: u16 = 1_440u16

Source§

type Output = u16

Source§

impl Per<Day> for Nanosecond

Source§

const VALUE: u64 = 86_400_000_000_000u64

Source§

type Output = u64

Source§

impl Per<Day> for Second

Source§

const VALUE: u32 = 86_400u32

Source§

type Output = u32

Source§

impl Per<Hour> for Hour

Source§

const VALUE: u8 = 1u8

Source§

type Output = u8

Source§

impl Per<Hour> for Microsecond

Source§

const VALUE: u32 = 3_600_000_000u32

Source§

type Output = u32

Source§

impl Per<Hour> for Millisecond

Source§

const VALUE: u32 = 3_600_000u32

Source§

type Output = u32

Source§

impl Per<Hour> for Minute

Source§

const VALUE: u8 = 60u8

Source§

type Output = u8

Source§

impl Per<Hour> for Nanosecond

Source§

const VALUE: u64 = 3_600_000_000_000u64

Source§

type Output = u64

Source§

impl Per<Hour> for Second

Source§

const VALUE: u16 = 3_600u16

Source§

type Output = u16

Source§

impl Per<Microsecond> for Microsecond

Source§

const VALUE: u8 = 1u8

Source§

type Output = u8

Source§

impl Per<Microsecond> for Nanosecond

Source§

const VALUE: u16 = 1_000u16

Source§

type Output = u16

Source§

impl Per<Millisecond> for Microsecond

Source§

const VALUE: u16 = 1_000u16

Source§

type Output = u16

Source§

impl Per<Millisecond> for Millisecond

Source§

const VALUE: u8 = 1u8

Source§

type Output = u8

Source§

impl Per<Millisecond> for Nanosecond

Source§

const VALUE: u32 = 1_000_000u32

Source§

type Output = u32

Source§

impl Per<Minute> for Microsecond

Source§

const VALUE: u32 = 60_000_000u32

Source§

type Output = u32

Source§

impl Per<Minute> for Millisecond

Source§

const VALUE: u16 = 60_000u16

Source§

type Output = u16

Source§

impl Per<Minute> for Minute

Source§

const VALUE: u8 = 1u8

Source§

type Output = u8

Source§

impl Per<Minute> for Nanosecond

Source§

const VALUE: u64 = 60_000_000_000u64

Source§

type Output = u64

Source§

impl Per<Minute> for Second

Source§

const VALUE: u8 = 60u8

Source§

type Output = u8

Source§

impl Per<Nanosecond> for Nanosecond

Source§

const VALUE: u8 = 1u8

Source§

type Output = u8

Source§

impl Per<Second> for Microsecond

Source§

const VALUE: u32 = 1_000_000u32

Source§

type Output = u32

Source§

impl Per<Second> for Millisecond

Source§

const VALUE: u16 = 1_000u16

Source§

type Output = u16

Source§

impl Per<Second> for Nanosecond

Source§

const VALUE: u32 = 1_000_000_000u32

Source§

type Output = u32

Source§

impl Per<Second> for Second

Source§

const VALUE: u8 = 1u8

Source§

type Output = u8

Source§

impl Per<Week> for Day

Source§

const VALUE: u8 = 7u8

Source§

type Output = u8

Source§

impl Per<Week> for Hour

Source§

const VALUE: u8 = 168u8

Source§

type Output = u8

Source§

impl Per<Week> for Microsecond

Source§

const VALUE: u64 = 604_800_000_000u64

Source§

type Output = u64

Source§

impl Per<Week> for Millisecond

Source§

const VALUE: u32 = 604_800_000u32

Source§

type Output = u32

Source§

impl Per<Week> for Minute

Source§

const VALUE: u16 = 10_080u16

Source§

type Output = u16

Source§

impl Per<Week> for Nanosecond

Source§

const VALUE: u64 = 604_800_000_000_000u64

Source§

type Output = u64

Source§

impl Per<Week> for Second

Source§

const VALUE: u32 = 604_800u32

Source§

type Output = u32

Source§

impl Per<Week> for Week

Source§

const VALUE: u8 = 1u8

Source§

type Output = u8