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 Binaryimpl GenericRadix for Octalimpl GenericRadix for Decimalimpl GenericRadix for LowerHeximpl GenericRadix for UpperHeximpl GenericRadix for Radix