Generate a new unique transaction ID based on system time
()
| 21 | impl TransactionId { |
| 22 | /// Generate a new unique transaction ID based on system time |
| 23 | pub fn new() -> Self { |
| 24 | let timestamp = SystemTime::now() |
| 25 | .duration_since(UNIX_EPOCH) |
| 26 | .unwrap() |
| 27 | .as_nanos() as u64; |
| 28 | TransactionId(timestamp) |
| 29 | } |
| 30 | |
| 31 | /// Get the underlying ID value |
| 32 | pub fn id(&self) -> u64 { |
nothing calls this directly
no test coverage detected