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 InputChannelFull,
24
25 OutputChannelFull,
27
28 AuthRequestByLogin(AuthRequestByLogin),
30
31 AuthRequestByToken(AuthRequestByToken),
33
34 AuthResponseErr(AuthResponseErr),
36
37 AuthResponseOk(AuthResponseOk),
39
40 Ping(Ping),
42
43 Pong(Pong),
45}
46
47impl System {
48 pub fn define_enabled_routes(&self) -> bool {
50 match self {
51 System::InputChannelFull => todo!(),
52 System::OutputChannelFull => todo!(),
53 System::AuthRequestByLogin(_) => todo!(),
54 System::AuthRequestByToken(_) => todo!(),
55 System::AuthResponseErr(_) => todo!(),
56 System::AuthResponseOk(_) => todo!(),
57 System::Ping(_) => todo!(),
58 System::Pong(_) => todo!(),
59 }
60 }
61}