Crate unique_uuid

Crate unique_uuid 

Source
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 serde feature
  • 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§

UniqueTag
A type-safe wrapper around uuid::Uuid for storing unique type identifiers.

Traits§

UniqueTypeTag
A trait for types that have an associated unique identifier.

Derive Macros§

UniqueTypeTag
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.