Debian Codegraph @

src/encoding/printable_integer.rs

raw symbols SCIP
1 #[cfg(not(feature = "std"))]
2 use core::fmt::Display;
3 #[cfg(feature = "std")]
4 use std::fmt::Display;
5
6 /// A value that can be formatted as a decimal integer
7 pub trait PrintableInteger: Display {}
8
9 macro_rules! impl_integer {
10 ($($type:ty)*) => {$(
11 impl PrintableInteger for $type {}
12 )*}
13 }
14
15 impl_integer!(u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize);