giga-chess-api-types 0.1.0

A library providing shared types between giga-chess client and server.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct PublicUserInfo {
    pub name: String,
}

#[cfg(feature = "axum")]
impl axum::response::IntoResponse for PublicUserInfo {
    fn into_response(self) -> axum::response::Response {
        axum::Json(self).into_response()
    }
}