• Home
  • Raw
  • Download

Lines Matching +full:ts +full:- +full:node

9     /// Create a new version 6 UUID using the current system time and node ID.
19 pub fn now_v6(node_id: &[u8; 6]) -> Self { in now_v6()
20 let ts = Timestamp::now(crate::timestamp::context::shared_context()); localVariable
22 Self::new_v6(ts, node_id)
25 /// Create a new version 6 UUID using the given timestamp and a node ID.
36 /// 1. The *node ID* is unique for this process,
57 /// # fn random_seed() -> u16 { 42 }
59 /// let ts = Timestamp::from_unix(context, 1497624119, 1234);
61 /// let uuid = Uuid::new_v6(ts, &[1, 2, 3, 4, 5, 6]);
65 /// "1e752a1f-3b49-658c-802a-010203040506"
73 /// # fn random_seed() -> u16 { 42 }
75 /// let ts = Timestamp::from_rfc4122(14976241191231231313, context.generate_sequence(0, 0) );
77 /// let uuid = Uuid::new_v6(ts, &[1, 2, 3, 4, 5, 6]);
81 /// "fd64c041-1e91-6551-802a-010203040506"
87 …Version 4](https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04#section
92 pub fn new_v6(ts: Timestamp, node_id: &[u8; 6]) -> Self { in new_v6()
93 let (ticks, counter) = ts.to_rfc4122();
124 let node = [1, 2, 3, 4, 5, 6]; in test_new() localVariable
127 let uuid = Uuid::new_v6(Timestamp::from_unix(context, time, time_fraction), &node); in test_new()
133 "1e74ba22-0616-6934-8000-010203040506" in test_new()
136 let ts = uuid.get_timestamp().unwrap().to_rfc4122(); in test_new() localVariable
138 assert_eq!(ts.0 - 0x01B2_1DD2_1381_4000, 14_968_545_358_129_460); in test_new()
141 let parsed = Uuid::parse_str("1e74ba22-0616-6934-8000-010203040506").unwrap(); in test_new()
160 let node = [1, 2, 3, 4, 5, 6]; in test_now() localVariable
162 let uuid = Uuid::now_v6(&node); in test_now()
180 let node = [1, 2, 3, 4, 5, 6]; in test_new_context() localVariable
185 let uuid1 = Uuid::new_v6(Timestamp::from_unix(&context, time, time_fraction), &node); in test_new_context()
189 let uuid2 = Uuid::new_v6(Timestamp::from_unix(&context, time, time_fraction), &node); in test_new_context()
196 let uuid3 = Uuid::new_v6(Timestamp::from_unix(&context, time, time_fraction), &node); in test_new_context()
197 let uuid4 = Uuid::new_v6(Timestamp::from_unix(&context, time, time_fraction), &node); in test_new_context()