pub struct Radix<T> { /* private fields */ }
Expand description
A struct to format a number in an arbitrary radix.
§Example:
use radix_fmt::Radix;
use std::fmt::Write;
let n = 15;
let mut s = String::new();
write!(&mut s, "{}", Radix::new(n, 3));
assert_eq!(s, "120"); // 15 is "120" in base 3
Implementations§
Trait Implementations§
source§impl Display for Radix<NonZeroI128>
impl Display for Radix<NonZeroI128>
source§impl Display for Radix<NonZeroI16>
impl Display for Radix<NonZeroI16>
source§impl Display for Radix<NonZeroI32>
impl Display for Radix<NonZeroI32>
source§impl Display for Radix<NonZeroI64>
impl Display for Radix<NonZeroI64>
source§impl Display for Radix<NonZeroIsize>
impl Display for Radix<NonZeroIsize>
source§impl Display for Radix<NonZeroU128>
impl Display for Radix<NonZeroU128>
source§impl Display for Radix<NonZeroU16>
impl Display for Radix<NonZeroU16>
source§impl Display for Radix<NonZeroU32>
impl Display for Radix<NonZeroU32>
source§impl Display for Radix<NonZeroU64>
impl Display for Radix<NonZeroU64>
source§impl Display for Radix<NonZeroUsize>
impl Display for Radix<NonZeroUsize>
impl<T: Copy> Copy for Radix<T>
Auto Trait Implementations§
impl<T> Freeze for Radix<T>where
T: Freeze,
impl<T> RefUnwindSafe for Radix<T>where
T: RefUnwindSafe,
impl<T> Send for Radix<T>where
T: Send,
impl<T> Sync for Radix<T>where
T: Sync,
impl<T> Unpin for Radix<T>where
T: Unpin,
impl<T> UnwindSafe for Radix<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)