entity_id

Crates.ioentity_id
lib.rsentity_id
version0.0.4
sourcesrc
created_at2023-03-26 02:03:29.426584
updated_at2023-03-26 18:34:29.886527
descriptionProduction-grade entity IDs for your web application
homepage
repositoryhttps://github.com/maxdeviant/entity-id
max_upload_size
id820772
size4,353
Marshall Bowers (maxdeviant)

documentation

https://docs.rs/entity_id

README

entity_id

Crates.io Docs.rs Crates.io

Production-grade entity IDs for your web application.

Usage

use entity_id::EntityId;
use ulid::Ulid;

#[derive(EntityId, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
#[entity_id(prefix = "movie")]
struct MovieId(Ulid);

let movie_id = MovieId::new();

println!("{}", movie_id);
// movie_01gwe2pv0c3p1xbcfvm4n8vx08
Commit count: 53

cargo fmt