Crate puuid

Crate puuid 

Source
Expand description

§Puuid (Prefixed UUID)

View documentation. puuid provides a type-safe wrapper around standard UUIDs that includes a static prefix (e.g., user_, post_).

§Modules

  • [wrapper]: Contains the main Puuid struct.
  • prefix: Contains the Prefix trait and helper macro.

§Usage

use puuid::{Puuid, prefix};

prefix!(User, "user");
type UserId = Puuid<User>;

let id = UserId::new_v7();
assert!(id.to_string().starts_with("user_"));

Re-exports§

pub use uuid;

Macros§

prefix
Defines a Prefix unit struct for use with crate::Puuid.

Structs§

Puuid
A Prefixed UUID.
Uuid
A Universally Unique Identifier (UUID).

Traits§

Prefix
A trait that defines the prefix string for a specific ID type.