use std::fmt::{Binary, Debug, LowerHex}; pub struct HexNum(pub N); impl Debug for HexNum { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { LowerHex::fmt(&self.0, f) } } pub struct BinNum(pub N); impl Debug for BinNum { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Binary::fmt(&self.0, f) } }