Trait fancy_duration::AsSecs
source · pub trait AsSecs: Sized {
// Required methods
fn as_secs(&self) -> i64;
fn parse_to_duration(s: &str) -> Result<Self, Error>;
}Expand description
To implement a fancier duration, just have your duration return the number of seconds as a part of the following method call, as well as a method to handle parsing.