time::ext::digit_count

Trait DigitCount

Source
pub(crate) trait DigitCount {
    // Required method
    fn num_digits(self) -> u8;
}
Expand description

A trait that indicates the formatted width of the value can be determined.

Note that this should not be implemented for any signed integers. This forces the caller to write the sign if desired.

Required Methods§

Source

fn num_digits(self) -> u8

The number of digits in the stringified value.

Implementations on Foreign Types§

Source§

impl DigitCount for u8

Source§

impl DigitCount for u16

Source§

impl DigitCount for u32

Implementors§