Expand description
§shortguid
Provides short, URL-safe UUID representations.
let from_uuid = ShortGuid::try_parse("c9a646d3-9c61-4cb7-bfcd-ee2522c8f633").unwrap();
let from_short = ShortGuid::try_parse("yaZG05xhTLe_ze4lIsj2Mw").unwrap();
assert_eq!(from_uuid, "yaZG05xhTLe_ze4lIsj2Mw");
assert_eq!(from_uuid, from_short);
let random = ShortGuid::new_random();
assert_ne!(from_uuid, random);§Create features
Other crate features can also be useful beyond the version support:
serde- adds the ability to serialize and deserialize a UUID usingserde.borsh- adds the ability to serialize and deserialize a UUID usingborsh.arbitrary- adds anArbitrarytrait implementation toUuidfor fuzzing.random- adds the ability to generate a randomShortGuids.fast-rng- uses a faster algorithm for generating randomShortGuids. This feature requires more dependencies to compile, but is just as suitable forShortGuidas the default algorithm. Impliesrandom, enabled by default.bytemuck- adds aPodtrait implementation toUuidfor byte manipulation.
Structs§
- Short
Guid - A short, URL-safe UUID representation.
Enums§
- Parse
Error - A parsing error.