summaryrefslogtreecommitdiffstats
path: root/src/roster.rs
blob: d49a1522470a236c0d840b0ff6751d241fb192d0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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(),
        }
    }
}