api/dto/events.rs
1use serde::{Deserialize, Serialize};
2
3use crate::dto::GameIdDTO;
4
5/// Represents a change in the availability of a game.
6///
7/// This DTO is sent to clients to notify them when a game becomes available
8/// or is removed from the list of joinable games.
9#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
10pub enum AvailableGameEventDTO {
11 /// A game has been created and is available for joining.
12 Created {
13 /// The unique identifier of the game.
14 game_id: GameIdDTO,
15
16 /// The display name of the game.
17 name: String,
18 },
19}