Crates.io | entity_id |
lib.rs | entity_id |
version | 0.0.4 |
source | src |
created_at | 2023-03-26 02:03:29.426584 |
updated_at | 2023-03-26 18:34:29.886527 |
description | Production-grade entity IDs for your web application |
homepage | |
repository | https://github.com/maxdeviant/entity-id |
max_upload_size | |
id | 820772 |
size | 4,353 |
Production-grade entity IDs for your web application.
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