work
This commit is contained in:
29
src/net/msg.rs
Normal file
29
src/net/msg.rs
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user