entity_id
Production-grade entity IDs for your web application.
Usage
use EntityId;
use Ulid;
;
let movie_id = new;
println!;
// movie_01gwe2pv0c3p1xbcfvm4n8vx08
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