Trait TimeSpanNumExt

Source
pub trait TimeSpanNumExt {
    // Required methods
    fn nanoseconds(self) -> TimeSpan;
    fn microseconds(self) -> TimeSpan;
    fn milliseconds(self) -> TimeSpan;
    fn seconds(self) -> TimeSpan;
    fn minutes(self) -> TimeSpan;
    fn hours(self) -> TimeSpan;
    fn days(self) -> TimeSpan;
}
Expand description

This trait adds methods to integers to convert values into TimeSpans.

Required Methods§

Source

fn nanoseconds(self) -> TimeSpan

Convert integer value into TimeSpan with that amount of nanoseconds.

Source

fn microseconds(self) -> TimeSpan

Convert integer value into TimeSpan with that amount of microseconds.

Source

fn milliseconds(self) -> TimeSpan

Convert integer value into TimeSpan with that amount of milliseconds.

Source

fn seconds(self) -> TimeSpan

Convert integer value into TimeSpan with that amount of seconds.

Source

fn minutes(self) -> TimeSpan

Convert integer value into TimeSpan with that amount of minutes.

Source

fn hours(self) -> TimeSpan

Convert integer value into TimeSpan with that amount of hours.

Source

fn days(self) -> TimeSpan

Convert integer value into TimeSpan with that amount of days.

Implementations on Foreign Types§

Source§

impl TimeSpanNumExt for u64

Implementors§