ClockHand

Trait ClockHand 

Source
pub trait ClockHand {
    const GRANULARITY: u8;
    const MAX: u8;

    // Required method
    fn to_long_short(value: u8) -> (u8, u8);
}
Expand description

A trait describing the properties of a clock hand

Required Associated Constants§

Source

const GRANULARITY: u8

The granularity of the given hand

Source

const MAX: u8

The maximum value of the given hand

Required Methods§

Source

fn to_long_short(value: u8) -> (u8, u8)

Converts a hand value into a number of long and short symbols

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ClockHand for Hour

Source§

const GRANULARITY: u8 = 1u8

Source§

const MAX: u8 = 24u8

Source§

impl ClockHand for Minute

Source§

const GRANULARITY: u8 = 5u8

Source§

const MAX: u8 = 60u8