pub struct HumanReadableDuration { /* fields omitted */ }
Expand description
A data structure for parsing and managing a human readable duration representation
Get the duration time in seconds
use std::str::FromStr;
use human_readable_time::HumanReadableDuration;
let duration = HumanReadableDuration::from_str("10s");
assert_eq!(10, duration.unwrap().seconds());
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.