pub trait Unit {
// Required methods
fn one(&self) -> &'static str;
fn many(&self) -> &'static str;
fn format(
&self,
f: &mut Formatter<'_>,
value: u64,
allow_zero: bool,
started: &mut bool,
) -> Result;
}Expand description
Duration part formatter Unit. Each unit is responsible to format a specific part of the duration