Added clientmessage

This commit is contained in:
Franklin 2023-02-21 12:59:03 -04:00
parent 639f55a063
commit 8b742e5902
2 changed files with 15 additions and 1 deletions

13
src/dto/message.rs Normal file
View File

@ -0,0 +1,13 @@
use serde::{Serialize, Deserialize};
use serde_json::Value;
/// This is what gets sent across a socket. No matter if it comes from the client or the
/// Server. This is what gets put in Message::Text(HERE).
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
pub struct ClientMessage {
pub head: String,
#[serde(skip_serializing_if = "Value::is_null")]
pub body: Value,
}

View File

@ -1 +1,2 @@
pub mod chat;
pub mod chat;
pub mod message;