rsiot/message/system_messages/
mod.rs1mod auth_request_by_login;
4mod auth_request_by_token;
5mod auth_response_error;
6mod auth_response_ok;
7mod ping_pong;
8
9pub use auth_request_by_login::AuthRequestByLogin;
10pub use auth_request_by_token::AuthRequestByToken;
11pub use auth_response_error::AuthResponseErr;
12pub use auth_response_ok::AuthResponseOk;
13pub use ping_pong::{Ping, Pong};
14
15use serde::{Deserialize, Serialize};
16
17use super::MsgKey;
18
19#[derive(Clone, Debug, Deserialize, MsgKey, PartialEq, Serialize)]
21pub enum System {
22 AuthRequestByLogin(AuthRequestByLogin),
24
25 AuthRequestByToken(AuthRequestByToken),
27
28 AuthResponseErr(AuthResponseErr),
30
31 AuthResponseOk(AuthResponseOk),
33
34 Ping(Ping),
36
37 Pong(Pong),
39
40 EspWifiConnected,
42}
43
44impl System {
45 pub fn define_enabled_routes(&self) -> bool {
47 match self {
48 System::AuthRequestByLogin(_) => todo!(),
49 System::AuthRequestByToken(_) => todo!(),
50 System::AuthResponseErr(_) => todo!(),
51 System::AuthResponseOk(_) => todo!(),
52 System::Ping(_) => todo!(),
53 System::Pong(_) => todo!(),
54 System::EspWifiConnected => false,
55 }
56 }
57}