pub trait Integer: Sealed { }Expand description
An integer that can be written into an Itoa.
let itoa = Itoa::new(-2147483648_i64);
assert_eq!(itoa, "-2147483648");
// NonZero types work too.
let itoa = Itoa::new(std::num::NonZeroU32::new(1000).unwrap());
assert_eq!(itoa, "1000");
// ⚠️ Manual lossy conversion.
let itoa = Itoa::new(134.425 as u8);
assert_eq!(itoa, "134"); // decimal truncatedObject Safety§
This trait is not object safe.