nil_payload/response/
round.rs1use derive_more::{Deref, DerefMut, From, Into};
5use nil_core::round::Round;
6use serde::{Deserialize, Serialize};
7
8#[cfg(feature = "axum")]
9use nil_payload_macros::IntoJsonResponse;
10
11#[derive(Clone, Debug, Deref, DerefMut, From, Into, Deserialize, Serialize)]
12#[cfg_attr(feature = "axum", derive(IntoJsonResponse))]
13#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
14#[cfg_attr(feature = "typescript", ts(export))]
15pub struct GetRoundResponse(pub Round);
16
17#[derive(Clone, Debug, Deref, DerefMut, From, Into, Deserialize, Serialize)]
18#[cfg_attr(feature = "axum", derive(IntoJsonResponse))]
19#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
20#[cfg_attr(feature = "typescript", ts(export))]
21pub struct SetPlayerReadyResponse(pub Round);
22
23#[derive(Clone, Debug, Deref, DerefMut, From, Into, Deserialize, Serialize)]
24#[cfg_attr(feature = "axum", derive(IntoJsonResponse))]
25#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
26#[cfg_attr(feature = "typescript", ts(export))]
27pub struct StartRoundResponse(pub Round);