pub fn duration_to_qos_ms(d: Duration) -> Result<u32, TransportError>Expand description
Phase-301 (issue 0241) — lower a core::time::Duration into a u32
millisecond QoS field. Boundary contract:
- zero stays
0(unset / no-check); - sub-millisecond remainders CEIL to the next ms (rounding down would silently turn a real deadline into “no deadline”);
- values at or past
DURATION_INFINITE_MSms are a create-time error, never a clamp (infinite is requested via the sentinel or0, not by a huge finite duration). The bound starts one below, atDURATION_BEST_AVAILABLE_MS(issue 1973), so no finite duration can collide with that sentinel either.