summaryrefslogtreecommitdiffstats
path: root/src/roster.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/roster.rs')
-rw-r--r--src/roster.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/roster.rs b/src/roster.rs
new file mode 100644
index 0000000..75f4c3b
--- /dev/null
+++ b/src/roster.rs
@@ -0,0 +1,21 @@
+use std::collections::HashMap;
+
+use jid::BareJID;
+use reactive_stores::Store;
+
+use crate::contact::MacawContact;
+
+#[derive(Store, Clone)]
+pub struct Roster {
+ #[store(key: BareJID = |(jid, _)| jid.clone())]
+ contacts: HashMap<BareJID, MacawContact>,
+}
+
+impl Roster {
+ pub fn new() -> Self {
+ Self {
+ contacts: HashMap::new(),
+ }
+ }
+}
+