Debian Codegraph @

third_party/rust/uuid/examples/random_uuid.rs

raw
1 //! Generating a random UUID.
2 //!
3 //! If you enable the `v4` feature you can generate random UUIDs.
4
5 #[test]
6 #[cfg(feature = "v4")]
7 fn generate_random_uuid() {
8 use uuid::Uuid;
9
10 let uuid = Uuid::new_v4();
11
12 assert_eq!(Some(uuid::Version::Random), uuid.get_version());
13 }
14
15 fn main() {}