Struct friendly::temporal::HumanDuration [−][src]
pub struct HumanDuration { /* fields omitted */ }
Expand description
Human-displayable durations (from Duration).
There are two settings to tweak on a displayable duration:
- Whether it is full (“3 hours 2 minutes 3.42 seconds”) or compact (“2h2m3.42s”)
- How many components are displayed (e.g. with 3 parts, “5d3h2m” will omit seconds)
The default is compact display with 3 parts.
Implementations
Create a new readable duration from seconds.
Set whether display is compact.
Set the number of parts to display (0 for all).
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for HumanDuration
impl Send for HumanDuration
impl Sync for HumanDuration
impl Unpin for HumanDuration
impl UnwindSafe for HumanDuration