mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-24 19:59:48 +02:00
Fix: serialize EntityMethod::Unknown::payload as hex
This commit is contained in:
1 parent
3f557e33bf
commit
705280fc19
1 file changed
+8
-1
@@ -1,15 +1,22 @@
|
|||||||
use byteorder::{LittleEndian, ReadBytesExt};
|
use byteorder::{LittleEndian, ReadBytesExt};
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
use serde_with::serde_as;
|
||||||
|
|
||||||
use crate::result::Result;
|
use crate::result::Result;
|
||||||
|
|
||||||
|
#[serde_as]
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
pub enum EntityMethod {
|
pub enum EntityMethod {
|
||||||
/// TODO: team composition.
|
/// TODO: team composition.
|
||||||
Subtype2F,
|
Subtype2F,
|
||||||
|
|
||||||
/// Default variant when subtype is not known.
|
/// Default variant when subtype is not known.
|
||||||
Unknown { sub_type: u32, payload: Vec<u8> },
|
Unknown {
|
||||||
|
sub_type: u32,
|
||||||
|
|
||||||
|
#[serde_as(as = "serde_with::hex::Hex")]
|
||||||
|
payload: Vec<u8>,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EntityMethod {
|
impl EntityMethod {
|
||||||
|
|||||||
Reference in new issue
Block a user