Skip to main content

Module signed_duration

Module signed_duration 

Source
Expand description

The SignedDuration 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, and DivAssign for SignedDuration for various signed types.
try_from_secs ๐Ÿ”’
This is adapted from the std implementation, which uses mostly bit operations to ensure the highest precision:

Structsยง

SignedDuration
A span of time with nanosecond precision.

Enumsยง

FloatConstructorError ๐Ÿ”’
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 nanosecond field of SignedDuration.