Yeah, I'd prefer that as well. In order to prevent a discrepancy between repr(T) and the casting in id(), I guess one could introduce a deriveproc macro, that both sets repr(T) and implements id() -> T. However, I guess you'd need a macro for each possible type, because afaik procedural macros cannot be parameterized. So there's no way to have #[derive(Identify(u8))], but you'd then have #[derive(IdentifyU8)] instead.