macro_rules! impl_named { ($t:ident) => { ... }; }
Automatically implements Named for a type.
Named
It doesn’t work very well for types whose names contain several tokens, like (u8, u8), &str, or Vec<bool>.
(u8, u8)
&str
Vec<bool>
use malachite_base::named::Named; assert_eq!(u8::NAME, "u8"); assert_eq!(String::NAME, "String");