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

Parses a Duration from a string.

The accepted syntax for a Duration is exactly the same syntax accepted by the SQL interval type, i.e., as parsed by strconv::parse_interval, except that negative intervals are rejected as they are not representable in Rust’s duration type.