Struct radix_fmt::Radix [] [src]

pub struct Radix<T> { /* fields omitted */ }

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

Methods

impl<T> Radix<T>
[src]

[src]

Create a new displayable number from number and base. The base must be in the range [2, 36].

Trait Implementations

impl<T: Debug> Debug for Radix<T>
[src]

[src]

Formats the value using the given formatter. Read more

impl<T: Clone> Clone for Radix<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Copy> Copy for Radix<T>
[src]

impl Display for Radix<i8>
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Radix<u8>
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Radix<i16>
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Radix<u16>
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Radix<i32>
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Radix<u32>
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Radix<i64>
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Radix<u64>
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Radix<isize>
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Radix<usize>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T> Send for Radix<T> where
    T: Send

impl<T> Sync for Radix<T> where
    T: Sync