Skip to main content

parse_duration

Function parse_duration 

Source
pub fn parse_duration(s: &str) -> Result<Duration, String>
Expand description

Parse a std::time::Duration from human-readable string using endings like d, h, m, s, ms, ns e.g. “500ms”, “4h15m”, etc. See docu for go-parse-duration crate for details on the format