Skip to main content

nil_payload/
query.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use bon::Builder;
5use nil_core::world::config::WorldId;
6use nil_crypto::password::Password;
7use serde::Deserialize;
8
9#[cfg(feature = "typescript")]
10use ts_rs::TS;
11
12#[derive(Builder, Clone, Debug, Deserialize)]
13#[serde(rename_all = "camelCase")]
14#[cfg_attr(feature = "typescript", derive(TS))]
15#[cfg_attr(feature = "typescript", ts(optional_fields = nullable))]
16pub struct WebsocketQuery {
17  #[builder(start_fn)]
18  pub world_id: WorldId,
19  #[serde(default)]
20  #[builder(into)]
21  pub world_password: Option<Password>,
22}