Trait afsort::DigitAt
[−]
[src]
pub trait DigitAt { fn get_digit_at(&self, digit: usize) -> Option<u8>; }
Specifies that a type can deliver a radix at a certain digit/depth.
Required Methods
fn get_digit_at(&self, digit: usize) -> Option<u8>
Extracts a radix value at a certain digit for a type. Should return None if no value exists at the digit.
Example
use afsort::DigitAt; let num = 0x0502u16; assert_eq!(Some(5), num.get_digit_at(0)); assert_eq!(Some(2), num.get_digit_at(1)); assert_eq!(None, num.get_digit_at(2));