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#[derive(Builder, Clone, Debug, Deserialize)]
10#[serde(rename_all = "camelCase")]
11#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
12#[cfg_attr(feature = "typescript", ts(optional_fields = nullable))]
13pub struct WebsocketQuery {
14  #[builder(start_fn)]
15  pub world_id: WorldId,
16  #[serde(default)]
17  #[builder(into)]
18  pub world_password: Option<Password>,
19}