1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-10-01 08:44:05 +02:00
This commit is contained in:
Robin Appelman 2021-07-25 17:04:50 +02:00
commit 43b7270fcd
29 changed files with 3818 additions and 76 deletions

View file

@ -19,7 +19,13 @@ 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)
)]
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(bound(deserialize = "'a: 'static"))]
pub enum Packet<'a> {
@ -48,6 +54,10 @@ impl Packet<'_> {
}
}
#[cfg_attr(
feature = "wasm",
derive(wasm_typescript_definition::TypescriptDefinition)
)]
#[derive(BitRead, BitWrite, Debug, Clone, Copy, Eq, PartialEq)]
#[discriminant_bits = 8]
#[repr(u8)]