Trait tea_time::timeunit::TimeUnitTrait

source ·
pub trait TimeUnitTrait:
    Copy
    + Clone
    + Debug
    + PartialEq
    + Eq
    + Hash
    + PartialOrd
    + Ord {
    // Required method
    fn unit() -> TimeUnit;
}
Expand description

A trait for types representing time units.

This trait is implemented by types that represent specific units of time, such as years, months, days, hours, etc. It provides a common interface for these types and ensures they have certain properties and behaviors.

Required Methods§

source

fn unit() -> TimeUnit

Returns the corresponding TimeUnit enum variant for this time unit.

§Returns

A TimeUnit enum variant representing the specific time unit.

Object Safety§

This trait is not object safe.

Implementors§