AsFancyDuration

Trait AsFancyDuration 

Source
pub trait AsFancyDuration<T>
where Self: Sized, T: AsTimes + Clone,
{ // Required method fn fancy_duration(&self) -> FancyDuration<T>; }
Expand description

Implement AsFancyDuration for your Duration type, it will annotate those types with the fancy_duration function which allows trivial and explicit conversion into a fancy duration.

Required Methods§

Source

fn fancy_duration(&self) -> FancyDuration<T>

Convert T to a fancy_duration, which can be converted to a string representation of the duration.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AsFancyDuration<Duration> for Duration

Implementors§