type-uuid 0.1.2

Safe, stable IDs for Rust types
Documentation
1
2
3
4
5
6
7
8
9
10
11
use type_uuid::TypeUuid;
use uuid::Uuid;

#[derive(TypeUuid)]
#[uuid = "d4adfc76-f5f4-40b0-8e28-8a51a12f5e46"]
struct MyType;

fn main() {
    let uuid = Uuid::from_bytes(MyType::UUID);
    println!("{}", uuid);
}