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 mainPuuidstruct. prefix: Contains thePrefixtrait 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§
Traits§
- Prefix
- A trait that defines the prefix string for a specific ID type.