Trait DigitUtils

Source
pub trait DigitUtils {
    // Required methods
    fn digit(self) -> u32;
    fn leftmost_digit(self) -> Self;
    fn rightmost_digit(self) -> Self;
    fn nth_digit(self, n: u32) -> Self;
    fn digit_sum(self) -> Self;
}

Required Methods§

Source

fn digit(self) -> u32

Source

fn leftmost_digit(self) -> Self

Source

fn rightmost_digit(self) -> Self

Source

fn nth_digit(self, n: u32) -> Self

Source

fn digit_sum(self) -> Self

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.

Implementations on Foreign Types§

Source§

impl DigitUtils for i32

Source§

fn digit(self) -> u32

Source§

fn leftmost_digit(self) -> Self

Source§

fn rightmost_digit(self) -> Self

Source§

fn nth_digit(self, n: u32) -> Self

Source§

fn digit_sum(self) -> Self

Source§

impl DigitUtils for i64

Source§

fn digit(self) -> u32

Source§

fn leftmost_digit(self) -> Self

Source§

fn rightmost_digit(self) -> Self

Source§

fn nth_digit(self, n: u32) -> Self

Source§

fn digit_sum(self) -> Self

Source§

impl DigitUtils for i128

Source§

fn digit(self) -> u32

Source§

fn leftmost_digit(self) -> Self

Source§

fn rightmost_digit(self) -> Self

Source§

fn nth_digit(self, n: u32) -> Self

Source§

fn digit_sum(self) -> Self

Source§

impl DigitUtils for isize

Source§

fn digit(self) -> u32

Source§

fn leftmost_digit(self) -> Self

Source§

fn rightmost_digit(self) -> Self

Source§

fn nth_digit(self, n: u32) -> Self

Source§

fn digit_sum(self) -> Self

Source§

impl DigitUtils for u32

Source§

fn digit(self) -> u32

Source§

fn leftmost_digit(self) -> Self

Source§

fn rightmost_digit(self) -> Self

Source§

fn nth_digit(self, n: u32) -> Self

Source§

fn digit_sum(self) -> Self

Source§

impl DigitUtils for u64

Source§

fn digit(self) -> u32

Source§

fn leftmost_digit(self) -> Self

Source§

fn rightmost_digit(self) -> Self

Source§

fn nth_digit(self, n: u32) -> Self

Source§

fn digit_sum(self) -> Self

Source§

impl DigitUtils for u128

Source§

fn digit(self) -> u32

Source§

fn leftmost_digit(self) -> Self

Source§

fn rightmost_digit(self) -> Self

Source§

fn nth_digit(self, n: u32) -> Self

Source§

fn digit_sum(self) -> Self

Source§

impl DigitUtils for usize

Source§

fn digit(self) -> u32

Source§

fn leftmost_digit(self) -> Self

Source§

fn rightmost_digit(self) -> Self

Source§

fn nth_digit(self, n: u32) -> Self

Source§

fn digit_sum(self) -> Self

Implementors§