DurationDestination
Requires exact target-type construction from exact integer or finite IEEE time facts.
Module std.time
import std.time;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
DurationDestination
pub concept DurationDestination<Self>Requires exact target-type construction from exact integer or finite IEEE time facts.
This compile-time structural protocol preserves caller-selected duration type and unit without a runtime witness or implicit nominal conversion. Implementors must check representation range and honor Exact/Floor/Ceil/NearestEven semantics. Finite error paths must never produce an endless duration. Self: Concrete destination duration type.
DurationDestination.ConvertMagnitude
requires static fn ConvertMagnitude(Value: readonly DurationMagnitude&,
Period: DurationPeriod, Rounding: DurationRounding) -> Result<Self, DurationError>;Converts exact count facts from an exact source period into this target. Value: Exact source sign/magnitude, borrowed only for this call. Period: Positive reduced source period. Rounding: Explicit precision selection. Return: Checked destination or finite period/precision/range error.