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::convert::TryFrom;
use human_readable_time::HumanReadableDuration;
let duration = HumanReadableDuration::try_from("10s");
assert_eq!(10, duration.unwrap().seconds());
The type returned in the event of a conversion error.
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.