This commit is contained in:
2026-01-26 13:53:51 -05:00
parent e1eff49be9
commit 53ed4775ae
19 changed files with 565 additions and 350 deletions

29
src/net/msg.rs Normal file
View File

@@ -0,0 +1,29 @@
use super::data::*;
#[derive(Debug)]
pub enum ClientMsg {
CreateAccount(CreateAccount),
RequestMsgs,
SendMsg(SendMsg),
}
#[derive(Debug)]
pub enum ServerMsg {
AccountCreated(AccountCreated),
LoadMsg(LoadMsg),
LoadMsgs(Vec<LoadMsg>),
ServerError(ServerError),
}
pub type LoginKey = LoginKeyV0;
pub type SendMsg = SendMsgV0;
pub type LoadMsg = LoadMsgV0;
pub type ServerError = ServerErrorV0;
pub type CreateAccount = CreateAccountV0;
pub type AccountCreated = AccountCreatedV0;
impl From<CreateAccount> for ClientMsg {
fn from(value: CreateAccount) -> Self {
Self::CreateAccount(value)
}
}