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

source§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Day> for Hour

source§

type Output = u8

source§

const VALUE: u8 = 24u8

source§

impl Per<Day> for Microsecond

source§

type Output = u64

source§

const VALUE: u64 = 86_400_000_000u64

source§

impl Per<Day> for Millisecond

source§

type Output = u32

source§

const VALUE: u32 = 86_400_000u32

source§

impl Per<Day> for Minute

source§

type Output = u16

source§

const VALUE: u16 = 1_440u16

source§

impl Per<Day> for Nanosecond

source§

type Output = u64

source§

const VALUE: u64 = 86_400_000_000_000u64

source§

impl Per<Day> for Second

source§

type Output = u32

source§

const VALUE: u32 = 86_400u32

source§

impl Per<Hour> for Hour

source§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Hour> for Microsecond

source§

type Output = u32

source§

const VALUE: u32 = 3_600_000_000u32

source§

impl Per<Hour> for Millisecond

source§

type Output = u32

source§

const VALUE: u32 = 3_600_000u32

source§

impl Per<Hour> for Minute

source§

type Output = u8

source§

const VALUE: u8 = 60u8

source§

impl Per<Hour> for Nanosecond

source§

type Output = u64

source§

const VALUE: u64 = 3_600_000_000_000u64

source§

impl Per<Hour> for Second

source§

type Output = u16

source§

const VALUE: u16 = 3_600u16

source§

impl Per<Microsecond> for Microsecond

source§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Microsecond> for Nanosecond

source§

type Output = u16

source§

const VALUE: u16 = 1_000u16

source§

impl Per<Millisecond> for Microsecond

source§

type Output = u16

source§

const VALUE: u16 = 1_000u16

source§

impl Per<Millisecond> for Millisecond

source§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Millisecond> for Nanosecond

source§

type Output = u32

source§

const VALUE: u32 = 1_000_000u32

source§

impl Per<Minute> for Microsecond

source§

type Output = u32

source§

const VALUE: u32 = 60_000_000u32

source§

impl Per<Minute> for Millisecond

source§

type Output = u16

source§

const VALUE: u16 = 60_000u16

source§

impl Per<Minute> for Minute

source§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Minute> for Nanosecond

source§

type Output = u64

source§

const VALUE: u64 = 60_000_000_000u64

source§

impl Per<Minute> for Second

source§

type Output = u8

source§

const VALUE: u8 = 60u8

source§

impl Per<Nanosecond> for Nanosecond

source§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Second> for Microsecond

source§

type Output = u32

source§

const VALUE: u32 = 1_000_000u32

source§

impl Per<Second> for Millisecond

source§

type Output = u16

source§

const VALUE: u16 = 1_000u16

source§

impl Per<Second> for Nanosecond

source§

type Output = u32

source§

const VALUE: u32 = 1_000_000_000u32

source§

impl Per<Second> for Second

source§

type Output = u8

source§

const VALUE: u8 = 1u8

source§

impl Per<Week> for Day

source§

type Output = u8

source§

const VALUE: u8 = 7u8

source§

impl Per<Week> for Hour

source§

type Output = u8

source§

const VALUE: u8 = 168u8

source§

impl Per<Week> for Microsecond

source§

type Output = u64

source§

const VALUE: u64 = 604_800_000_000u64

source§

impl Per<Week> for Millisecond

source§

type Output = u32

source§

const VALUE: u32 = 604_800_000u32

source§

impl Per<Week> for Minute

source§

type Output = u16

source§

const VALUE: u16 = 10_080u16

source§

impl Per<Week> for Nanosecond

source§

type Output = u64

source§

const VALUE: u64 = 604_800_000_000_000u64

source§

impl Per<Week> for Second

source§

type Output = u32

source§

const VALUE: u32 = 604_800u32

source§

impl Per<Week> for Week

source§

type Output = u8

source§

const VALUE: u8 = 1u8