rsiot/message/system_messages/
mod.rsmod auth_request_by_login;
mod auth_request_by_token;
mod auth_response_error;
mod auth_response_ok;
mod ping_pong;
pub use auth_request_by_login::AuthRequestByLogin;
pub use auth_request_by_token::AuthRequestByToken;
pub use auth_response_error::AuthResponseErr;
pub use auth_response_ok::AuthResponseOk;
pub use ping_pong::{Ping, Pong};
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub enum System {
AuthRequestByLogin(AuthRequestByLogin),
AuthRequestByToken(AuthRequestByToken),
AuthResponseErr(AuthResponseErr),
AuthResponseOk(AuthResponseOk),
Ping(Ping),
Pong(Pong),
EspWifiConnected,
}
impl System {
pub fn define_enabled_routes(&self) -> bool {
match self {
System::AuthRequestByLogin(_) => todo!(),
System::AuthRequestByToken(_) => todo!(),
System::AuthResponseErr(_) => todo!(),
System::AuthResponseOk(_) => todo!(),
System::Ping(_) => todo!(),
System::Pong(_) => todo!(),
System::EspWifiConnected => false,
}
}
}