Skip to main content

Module unit

Module unit 

Source
Expand description

Conversion between units of time.

Modulesยง

sealed ๐Ÿ”’

Macrosยง

declare_types ๐Ÿ”’
Declare all unit types.
impl_partial_eq_ord ๐Ÿ”’
Implement PartialEq and PartialOrd between unit types.
impl_partial_eq_ord_for_unit ๐Ÿ”’
Symmetrically implement PartialEq and PartialOrd between Unit and all unit types.
impl_per ๐Ÿ”’
Implement Per for all relevant types. Identity implementations are automatic.
stringify_outputs ๐Ÿ”’
Given the list of types, stringify them as a list.

Structsยง

Day
A unit of time representing exactly N days.
Hour
A unit of time representing exactly N hours.
Microsecond
A unit of time representing exactly N microseconds.
Millisecond
A unit of time representing exactly N milliseconds.
Minute
A unit of time representing exactly N minutes.
Nanosecond
A unit of time representing exactly N nanoseconds.
Second
A unit of time representing exactly N seconds.
Week
A unit of time representing exactly N weeks.

Enumsยง

Unit
A statically-known multiple of a given unit of time.

Functionsยง

multiple_of_value ๐Ÿ”’