Struct human_readable_time::HumanReadableDuration[][src]

pub struct HumanReadableDuration { /* fields omitted */ }
Expand description

A data structure for parsing and managing a human readable duration representation

Implementations

Get the duration time in seconds

Example
use std::convert::TryFrom;
use human_readable_time::HumanReadableDuration;

let duration = HumanReadableDuration::try_from("10s");

assert_eq!(10, duration.unwrap().seconds());

Trait Implementations

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.