ParseFancyDuration

Trait ParseFancyDuration 

Source
pub trait ParseFancyDuration<T>
where Self: Sized, T: AsTimes + Clone,
{ // Required method fn parse_fancy_duration(s: String) -> Result<Self, Error>; }
Expand description

Implement ParseFancyDuration for your Duration type to implement parsing constructors for your Duration. A more generic parse implementation for String and &str may come in a future version.

Required Methods§

Source

fn parse_fancy_duration(s: String) -> Result<Self, Error>

Parse T from String, which allows the construction of a T from the fancy duration specified in the string.

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 ParseFancyDuration<Duration> for Duration

Implementors§