Skip to main content

parse_duration

Function parse_duration 

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

Parses a string in the exact format accepted by Go’s time.ParseDuration, restricted to non-negative values (since std::time::Duration can’t represent negatives).