mirror of
https://codeberg.org/demostf/parser.git
synced 2026-10-01 08:44:05 +02:00
schemars
This commit is contained in:
parent
43b7270fcd
commit
93b51bff70
29 changed files with 15360 additions and 2187 deletions
|
|
@ -19,13 +19,8 @@ pub mod stop;
|
|||
pub mod stringtable;
|
||||
pub mod synctick;
|
||||
pub mod usercmd;
|
||||
#[cfg(feature = "wasm")]
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[cfg_attr(
|
||||
feature = "wasm",
|
||||
derive(wasm_typescript_definition::TypescriptDefinition)
|
||||
)]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(bound(deserialize = "'a: 'static"))]
|
||||
pub enum Packet<'a> {
|
||||
|
|
@ -54,10 +49,7 @@ impl Packet<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(
|
||||
feature = "wasm",
|
||||
derive(wasm_typescript_definition::TypescriptDefinition)
|
||||
)]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
#[derive(BitRead, BitWrite, Debug, Clone, Copy, Eq, PartialEq)]
|
||||
#[discriminant_bits = 8]
|
||||
#[repr(u8)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue