Lines Matching +full:ts +full:- +full:node
3 //! This module is soft-deprecated. Instead of using the `Context` type re-exported here,
12 /// Create a new version 1 UUID using the current system time and node ID.
22 pub fn now_v1(node_id: &[u8; 6]) -> Self { in now_v1()
23 let ts = Timestamp::now(crate::timestamp::context::shared_context()); localVariable
25 Self::new_v1(ts, node_id)
28 /// Create a new version 1 UUID using the given timestamp and node ID.
37 /// 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_v1(ts, &[1, 2, 3, 4, 5, 6]);
65 /// "f3b4958c-52a1-11e7-802a-010203040506"
74 /// let ts = Timestamp::from_rfc4122(14976234442241191232, context.generate_sequence(0, 0));
76 /// let uuid = Uuid::new_v1(ts, &[1, 2, 3, 4, 5, 6]);
80 /// "b2c1ad40-45e0-1fd6-802a-010203040506"
86 /// * [Version 1 UUIDs in RFC4122](https://www.rfc-editor.org/rfc/rfc4122#section-4.2)
91 pub fn new_v1(ts: Timestamp, node_id: &[u8; 6]) -> Self { in new_v1()
92 let (ticks, counter) = ts.to_rfc4122();
122 let node = [1, 2, 3, 4, 5, 6]; in test_new() localVariable
125 let uuid = Uuid::new_v1(Timestamp::from_unix(&context, time, time_fraction), &node); in test_new()
131 "20616934-4ba2-11e7-8000-010203040506" in test_new()
134 let ts = uuid.get_timestamp().unwrap().to_rfc4122(); in test_new() localVariable
136 assert_eq!(ts.0 - 0x01B2_1DD2_1381_4000, 14_968_545_358_129_460); in test_new()
139 let parsed = Uuid::parse_str("20616934-4ba2-11e7-8000-010203040506").unwrap(); in test_new()
158 let node = [1, 2, 3, 4, 5, 6]; in test_now() localVariable
160 let uuid = Uuid::now_v1(&node); in test_now()
178 let node = [1, 2, 3, 4, 5, 6]; in test_new_context() localVariable
183 let uuid1 = Uuid::new_v1(Timestamp::from_unix(&context, time, time_fraction), &node); in test_new_context()
187 let uuid2 = Uuid::new_v1(Timestamp::from_unix(&context, time, time_fraction), &node); in test_new_context()
194 let uuid3 = Uuid::new_v1(Timestamp::from_unix(&context, time, time_fraction), &node); in test_new_context()
195 let uuid4 = Uuid::new_v1(Timestamp::from_unix(&context, time, time_fraction), &node); in test_new_context()