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
26
27
28
29
30
31
32
33
34
|
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Server {
pub channels: Channel,
pub welcome_text: Option<String>,
pub username: String,
pub host: String,
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Channel {
pub description: Option<String>,
pub links: Vec<Vec<usize>>, //to represent several walks through the tree to find channels its linked to
pub max_users: u32,
pub name: String,
pub children: Vec<Channel>,
pub users: Vec<User>,
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct User {
pub comment: Option<String>,
pub hash: Option<String>,
pub name: String,
pub priority_speaker: bool,
pub recording: bool,
pub suppress: bool, // by me
pub self_mute: bool, // by self
pub self_deaf: bool, // by self
pub mute: bool, // by admin
pub deaf: bool, // by admin
}
|