I want to generate a unique id for every type at compile time. Is this possible in Rust?
So far, I have the following code
//Pseudo code struct Class
std::any::TypeId does something like that:
use std::any::TypeId; fn main() { let type_id = TypeId::of::(); println!("{:?}", type_id); }
outputs:
TypeId { t: 4150853580804116396 }