Skip to main content

DurationExt

Trait DurationExt 

Source
pub trait DurationExt {
    // Required methods
    fn s(self) -> Time;
    fn ms(self) -> Time;
}
Expand description

Allows for easy conversions of different number types into the time type(f32). Addition ally implements convenient functions for unit conversions- s ms

Required Methods§

Source

fn s(self) -> Time

seconds

Source

fn ms(self) -> Time

milliseconds

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl DurationExt for f32

Source§

fn s(self) -> Time

Source§

fn ms(self) -> Time

Source§

impl DurationExt for i32

Source§

fn s(self) -> Time

Source§

fn ms(self) -> Time

Source§

impl DurationExt for u32

Source§

fn s(self) -> Time

Source§

fn ms(self) -> Time

Source§

impl DurationExt for u64

Source§

fn s(self) -> Time

Source§

fn ms(self) -> Time

Implementors§