mirror of
https://codeberg.org/demostf/parser.git
synced 2026-10-01 08:44:05 +02:00
add serde support for packets
This commit is contained in:
parent
058ee0b96d
commit
03f8b8a424
27 changed files with 556 additions and 490 deletions
|
|
@ -10,6 +10,7 @@ use self::stringtable::StringTablePacket;
|
|||
use self::synctick::SyncTickPacket;
|
||||
use self::usercmd::UserCmdPacket;
|
||||
use crate::demo::parser::Encode;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub mod consolecmd;
|
||||
pub mod datatable;
|
||||
|
|
@ -19,7 +20,8 @@ pub mod stringtable;
|
|||
pub mod synctick;
|
||||
pub mod usercmd;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(bound(deserialize = "'a: 'static"))]
|
||||
pub enum Packet<'a> {
|
||||
Sigon(MessagePacket<'a>),
|
||||
Message(MessagePacket<'a>),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue