use serde::{Deserialize, Serialize}; | |
pub struct Point { | |
pub x: f32, | |
pub y: f32, | |
} | |
pub struct DrawAction { | |
pub color: String, | |
pub size: f32, | |
pub points: Vec<Point>, | |
} | |
pub enum ClientMessage { | |
Draw(DrawAction), | |
Clear, | |
} | |
pub enum ServerMessage { | |
Update(Vec<DrawAction>), | |
Clear, | |
} | |