summaryrefslogtreecommitdiffstats
path: root/src/types/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/types/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/types/mod.rs b/src/types/mod.rs
index ac6a307..ea7c570 100644
--- a/src/types/mod.rs
+++ b/src/types/mod.rs
@@ -1,8 +1,10 @@
+use std::time::Instant;
+
/* This file holds types passed between components.
* Whenever a type cannot be held local to a single module.
*/
-#[derive(Debug)]
+#[derive(Debug, Clone, Copy)]
pub struct Key {
pub key: [u8; 32],
pub id: u32,
@@ -15,8 +17,9 @@ impl PartialEq for Key {
}
}
-#[derive(Debug)]
+#[derive(Debug, Clone, Copy)]
pub struct KeyPair {
+ pub birth: Instant, // when was the key-pair created
pub confirmed: bool, // has the key-pair been confirmed?
pub send: Key, // key for outbound messages
pub recv: Key, // key for inbound messages