Expand description
A type-safe UUID-based tagging system for Rust.
This crate provides a way to associate unique, stable identifiers with types
across different platforms and compilation units. Unlike std::any::TypeId,
these identifiers remain stable across different compilations and platforms.
§Features
- Cross-platform stable type identification
- Serialization support via the
serdefeature - Type-safe wrapper around UUIDs
§Example
use unique_uuid::{UniqueTypeTag, UniqueTag};
#[derive(UniqueTypeTag)]
struct MyType;
let tag = MyType::TYPE_TAG;Re-exports§
pub extern crate uuid;
Macros§
- unique_
tag - A procedural macro that generates a unique UUID for a given string tag. The generated UUID is persisted in a TOML file to ensure consistency across multiple compilations and crate boundaries.
Structs§
- Unique
Tag - A type-safe wrapper around
uuid::Uuidfor storing unique type identifiers.
Traits§
- Unique
Type Tag - A trait for types that have an associated unique identifier.
Derive Macros§
- Unique
Type Tag - A derive macro that automatically generates a unique UUID for a type. The generated UUID is associated with the type name and persisted in a TOML file to ensure consistency across multiple compilations and crate boundaries.