4 ms·
You can also use associated consts which feels nicer in my opinion: #[repr(C)] #[derive(PartialEq, Eq, Clone, Copy)] struct Foo(i32); impl
by huntie 8y ago
You can also use associated consts which feels nicer in my opinion:
#[repr(C)]
#[derive(PartialEq, Eq, Clone, Copy)]
struct Foo(i32);
impl Foo {
const BAR: Foo = Foo(0);
const BAZ: Foo = Foo(1);
}