Duration struct and its associated
Durationfor various types.
- item 🔒Format the first item that produces a value greater than 1 and then break.
- item 🔒Format a single item.
- This is adapted from the
stdimplementation, which uses mostly bit operations to ensure the highest precision: https://github.com/rust-lang/rust/blob/3a37c2f0523c87147b64f1b8099fc9df22e8c53e/library/core/src/time.rs#L1262-L1340 Changes from
stdare marked and explained below.
- A span of time with nanosecond precision.
- Padding 🔒By explicitly inserting this enum where padding is expected, the compiler is able to better perform niche value optimization.