Debian Codegraph @

third_party/rust/uuid/examples/sortable_uuid.rs

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