Expand description
The Duration struct and its associated impls.
Macrosยง
- cast_
signed ๐ - Given a value and whether it is signed, cast it to the signed version.
- duration_
mul_ ๐div_ int - Implement
Mul(reflexively),MulAssign,Div, andDivAssignforDurationfor various signed types. - try_
from_ ๐secs - This is adapted from the
stdimplementation, which uses mostly bit operations to ensure the highest precision:
Structsยง
- Duration
- A span of time with nanosecond precision.
Enumsยง
- Float
Constructor ๐Error - Padding ๐
- By explicitly inserting this enum where padding is expected, the compiler is able to better perform niche value optimization.
Type Aliasesยง
- Nanoseconds ๐
- The type of the
nanosecondfield ofDuration.