Trait time_core::convert::sealed::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 Types§

source

type Output

The smallest unsigned integer type that can represent VALUE.

Required Associated Constants§

source

const VALUE: Self::Output

The number of one unit of time in the other.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Per<Day> for Day

§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Day> for Hour

§

type Output = u8

source§

const VALUE: u8 = 24u8

source§

impl Per<Day> for Microsecond

§

type Output = u64

source§

const VALUE: u64 = 86_400_000_000u64

source§

impl Per<Day> for Millisecond

§

type Output = u32

source§

const VALUE: u32 = 86_400_000u32

source§

impl Per<Day> for Minute

§

type Output = u16

source§

const VALUE: u16 = 1_440u16

source§

impl Per<Day> for Nanosecond

§

type Output = u64

source§

const VALUE: u64 = 86_400_000_000_000u64

source§

impl Per<Day> for Second

§

type Output = u32

source§

const VALUE: u32 = 86_400u32

source§

impl Per<Hour> for Hour

§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Hour> for Microsecond

§

type Output = u32

source§

const VALUE: u32 = 3_600_000_000u32

source§

impl Per<Hour> for Millisecond

§

type Output = u32

source§

const VALUE: u32 = 3_600_000u32

source§

impl Per<Hour> for Minute

§

type Output = u8

source§

const VALUE: u8 = 60u8

source§

impl Per<Hour> for Nanosecond

§

type Output = u64

source§

const VALUE: u64 = 3_600_000_000_000u64

source§

impl Per<Hour> for Second

§

type Output = u16

source§

const VALUE: u16 = 3_600u16

source§

impl Per<Microsecond> for Microsecond

§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Microsecond> for Nanosecond

§

type Output = u16

source§

const VALUE: u16 = 1_000u16

source§

impl Per<Millisecond> for Microsecond

§

type Output = u16

source§

const VALUE: u16 = 1_000u16

source§

impl Per<Millisecond> for Millisecond

§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Millisecond> for Nanosecond

§

type Output = u32

source§

const VALUE: u32 = 1_000_000u32

source§

impl Per<Minute> for Microsecond

§

type Output = u32

source§

const VALUE: u32 = 60_000_000u32

source§

impl Per<Minute> for Millisecond

§

type Output = u16

source§

const VALUE: u16 = 60_000u16

source§

impl Per<Minute> for Minute

§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Minute> for Nanosecond

§

type Output = u64

source§

const VALUE: u64 = 60_000_000_000u64

source§

impl Per<Minute> for Second

§

type Output = u8

source§

const VALUE: u8 = 60u8

source§

impl Per<Nanosecond> for Nanosecond

§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Second> for Microsecond

§

type Output = u32

source§

const VALUE: u32 = 1_000_000u32

source§

impl Per<Second> for Millisecond

§

type Output = u16

source§

const VALUE: u16 = 1_000u16

source§

impl Per<Second> for Nanosecond

§

type Output = u32

source§

const VALUE: u32 = 1_000_000_000u32

source§

impl Per<Second> for Second

§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Week> for Day

§

type Output = u8

source§

const VALUE: u8 = 7u8

source§

impl Per<Week> for Hour

§

type Output = u8

source§

const VALUE: u8 = 168u8

source§

impl Per<Week> for Microsecond

§

type Output = u64

source§

const VALUE: u64 = 604_800_000_000u64

source§

impl Per<Week> for Millisecond

§

type Output = u32

source§

const VALUE: u32 = 604_800_000u32

source§

impl Per<Week> for Minute

§

type Output = u16

source§

const VALUE: u16 = 10_080u16

source§

impl Per<Week> for Nanosecond

§

type Output = u64

source§

const VALUE: u64 = 604_800_000_000_000u64

source§

impl Per<Week> for Second

§

type Output = u32

source§

const VALUE: u32 = 604_800u32

source§

impl Per<Week> for Week

§

type Output = u8

source§

const VALUE: u8 = 1u8