Packages
·
v0.0.13
uuid
RFC 4122 version 4 (random) UUIDs, sourced from /dev/urandom and portable across macOS, Linux, and BSD.
The surface is small: Uuid::new_v4() -> Option[Uuid], Uuid::parse(s: str) -> Option[Uuid], and uuid.to_string() -> string (infallible, formatting into a stack [u8; 37] buffer).
import "uuid/uuid" as uuid;
guard let option::Option::Some(u) = uuid::Uuid::new_v4() else { return 1; };
println(u.to_string().as_str()); // "550e8400-e29b-41d4-a716-446655440000"