Installation
cargo add prefix_id
Usage
create_id!;
let id = new; // => "id_1234567890avjfwdnfvqdp"
// then you can use the impl methods
id.as_str; // => "id_1234567890avjfwdnfvqdp"
let my_string: String = id.into;
// you can also validate/convert it from string
let str = "id_1234567890avjfwdnfvqdp";
let id = from_str.unwrap;
// you can optionally set the feature `serde` flag to serialize/deserialize
let serialized = to_string.unwrap;
let deserialized = .unwrap;