Added packets folder for the packet-service until I automate generation at build time
This commit is contained in:
31
packet-service/src/packets/cli_clan_icon_req.rs
Normal file
31
packet-service/src/packets/cli_clan_icon_req.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
/* This file is @generated with IDL v0.2.2 */
|
||||
|
||||
use crate::dataconsts::*;
|
||||
use crate::enums::*;
|
||||
use crate::packet::PacketPayload;
|
||||
use crate::types::*;
|
||||
use bincode::de::read::Reader;
|
||||
use bincode::enc::write::Writer;
|
||||
use bincode::{de::Decoder, enc::Encoder, error::DecodeError, Decode, Encode};
|
||||
use utils::null_string::NullTerminatedString;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct CliClanIconReq {
|
||||
pub(crate) id: u32,
|
||||
}
|
||||
|
||||
impl PacketPayload for CliClanIconReq {}
|
||||
|
||||
impl Encode for CliClanIconReq {
|
||||
fn encode<E: Encoder>(&self, encoder: &mut E) -> std::result::Result<(), bincode::error::EncodeError> {
|
||||
self.id.encode(encoder)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl<Context> Decode<Context> for CliClanIconReq {
|
||||
fn decode<D: Decoder>(decoder: &mut D) -> std::result::Result<Self, bincode::error::DecodeError> {
|
||||
let id = u32::decode(decoder)?;
|
||||
Ok(Self { id })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user