Trait core::fmt::num::GenericRadix
[−]
[src]
trait GenericRadix { fn base(&self) -> u8; fn digit(&self, x: u8) -> u8; fn prefix(&self) -> &'static str { ... } fn fmt_int<T: Int>(&self, x: T, f: &mut Formatter) -> Result { ... } }
A type that represents a specific radix
Required Methods
fn base(&self) -> u8
The number of digits.
fn digit(&self, x: u8) -> u8
Converts an integer to corresponding radix digit.
Provided Methods
fn prefix(&self) -> &'static str
A radix-specific prefix string.
fn fmt_int<T: Int>(&self, x: T, f: &mut Formatter) -> Result
Format an integer using the radix using a formatter.
Implementors
impl GenericRadix for Binary
impl GenericRadix for Octal
impl GenericRadix for Decimal
impl GenericRadix for LowerHex
impl GenericRadix for UpperHex
impl GenericRadix for Radix