pub trait TypeUuid {
const UUID: Bytes;
}
Expand description
Provides a statically defined UUID for a Rust type.
§Examples
This crate provides a custom derive that allows you to specify a UUID as
a human-readable string. This is the recommended way to implement TypeUuid
for your types. You can use https://www.uuidgenerator.net to generate
random UUIDs to use with the derive.
use type_uuid::TypeUuid;
#[derive(TypeUuid)]
#[uuid = "d4adfc76-f5f4-40b0-8e28-8a51a12f5e46"]
struct MyType;
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.