1newtype! {
3 #[doc = r"A 4-bit integer (0 - 15)."]
4 name = U4, repr = u8, max = 15
5}
6
7impl_from_newtype_to_primitive!(U4, u8);
15impl_from_newtype_to_primitive!(U4, i8);
16impl_from_newtype_to_primitive!(U4, u16);
17impl_from_newtype_to_primitive!(U4, i16);
18impl_from_newtype_to_primitive!(U4, u32);
19impl_from_newtype_to_primitive!(U4, i32);
20impl_from_newtype_to_primitive!(U4, u64);
21impl_from_newtype_to_primitive!(U4, i64);
22impl_from_newtype_to_primitive!(U4, u128);
23impl_from_newtype_to_primitive!(U4, i128);
24impl_from_newtype_to_primitive!(U4, usize);
25impl_from_newtype_to_primitive!(U4, isize);
26
27impl_try_from_newtype_to_newtype!(crate::U14, U4);
29impl_try_from_newtype_to_newtype!(crate::U7, U4);
30
31impl_try_from_primitive_to_newtype!(u8, U4);
33impl_try_from_primitive_to_newtype!(u16, U4);
34impl_try_from_primitive_to_newtype!(i16, U4);
35impl_try_from_primitive_to_newtype!(u32, U4);
36impl_try_from_primitive_to_newtype!(i32, U4);
37impl_try_from_primitive_to_newtype!(u64, U4);
38impl_try_from_primitive_to_newtype!(i64, U4);
39impl_try_from_primitive_to_newtype!(u128, U4);
40impl_try_from_primitive_to_newtype!(i128, U4);
41impl_try_from_primitive_to_newtype!(usize, U4);
42impl_try_from_primitive_to_newtype!(isize, U4);