Function parse_duration
Source pub fn parse_duration(s: &str) -> Result<Duration, DurationError>
Expand description
Parses a human-readable duration string into a Duration.
Delegates to [humantime::parse_duration] which supports formats such as
"5s", "1m 30s", "2h", "100ms", etc.
ยงErrors
Returns an error if the string cannot be parsed as a valid duration.