refactor: align crates with dependency law
7e70ce86bff0177e34b3421350dc10d7392aaee9
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 0786575ac5ba
There are many coding harnesses - but this one is fast
7e70ce86bff0177e34b3421350dc10d7392aaee9
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+22 / −27 text lines
+1 / −1 text lines
+1 / −4 text lines
+17 / −15 text lines
pub const fn as_u128(&self) -> u128 { self.0.as_u128() } /// Rebuild an identifier from its bits. #[must_use] pub const fn from_u128(bits: u128) -> Self { Self(Uuid::from_u128(bits)) } /// Unix milliseconds encoded in the `UUIDv7` timestamp, if any. #[must_use] pub fn unix_millis(&self) -> Option<u64> { let timestamp = self.0.get_timestamp()?; let (seconds, nanos) = timestamp.to_unix(); Some(seconds * 1_000 + u64::from(nanos) / 1_000_000)+1 / −1 text lines
+2 / −6 text lines