WritePacket

Derive Macro WritePacket 

Source
#[derive(WritePacket)]
Expand description

This derive macro will implement the BanchoPacketWrite trait for the struct.

§Usage

use bancho_packets::{ReadPacket, WritePacket, PacketLength};

#[derive(Debug, Clone, ReadPacket, WritePacket, PacketLength)]
/// The [`ScoreFrame`] uploaded by the bancho client during multiplayer games.
pub struct ScoreFrame {
    pub timestamp: i32,
    pub id: u8,
    pub n300: u16,
    pub n100: u16,
    pub n50: u16,
    pub geki: u16,
    pub katu: u16,
    pub miss: u16,
    pub score: i32,
    pub combo: u16,
    pub max_combo: u16,
    pub perfect: bool,
    pub hp: u8,
    pub tag_byte: u8,
    pub score_v2: bool,
}