pub struct Int(_, _);Expand description
Human readable integer.
From takes an unsigned number as input and returns a ready-to-print!() Int.
f32 or f64 inputs will work, but the fractional parts will be ignored.
The inner fields are (u64, String) but they are not public.
Examples
| Input | String Output |
|---|---|
0 | 0 |
1 | 1 |
999 | 999 |
1000 | 1,000 |
1234567 | 1,234,567 |
100000000 | 100,000,000 |
1.123 | 1 |
2000.123 | 2,000 |
Implementations§
Trait Implementations§
source§impl Ord for Int
impl Ord for Int
source§impl PartialOrd<Int> for Int
impl PartialOrd<Int> for Int
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more