Skip to main content

DurationExtension

Trait DurationExtension 

Source
pub trait DurationExtension {
    // Required method
    fn get_time(&self) -> Time;
}
Expand description

Trait to extend the Duration type with a method to convert it to a Time struct.

Required Methods§

Source

fn get_time(&self) -> Time

Converts a Duration into a Time struct.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl DurationExtension for Duration

Source§

fn get_time(&self) -> Time

Implementors§