MCPcopy Create free account
hub / github.com/dfinity/orbit / next_unique_id

Function next_unique_id

tests/integration/src/upgrader_test_data.rs:30–36  ·  view source on GitHub ↗

Generate an ID for test data. Every time this function is called, it will return a new unique ID.

()

Source from the content-addressed store, hash-verified

28///
29/// Every time this function is called, it will return a new unique ID.
30pub fn next_unique_id() -> u64 {
31 UNIQUE_ID.with(|counter| {
32 let mut counter = counter.borrow_mut();
33 *counter += 1;
34 *counter
35 })
36}
37
38fn next_unique_uuid() -> String {
39 Uuid::from_u128(next_unique_id().into())

Callers 2

next_unique_uuidFunction · 0.70
generateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected