aboutsummaryrefslogtreecommitdiff
path: root/src/session/mod.rs
blob: debb8d9a0459df17cb681699fbb92b58e8a06c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use crate::message::objects::AliasManager;

/// The Session Trait is the main point of entry and implements the basic logic
pub trait Session {
    fn alias_manager(&mut self) -> &mut AliasManager;

    // fn sync(&mut self, msg: SyncMessage)
    // where
    //     Self: Sized,
    // {
    //     match msg.class_name.as_str() {
    //         "AliasManager" => self.alias_manager().sync(self, msg),
    //         _ => (),
    //     }
    // }
}

impl<T> Session for &T
where
    T: Session,
{
    fn alias_manager(&mut self) -> &mut AliasManager {
        todo!()
    }
}