1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use crate::{Bounded, Decode, Encode, FixedBitSet, Packet, VarInt};

#[derive(Clone, Debug, Encode, Decode, Packet)]
pub struct CommandExecutionC2s<'a> {
    pub command: Bounded<&'a str, 256>,
    pub timestamp: u64,
    pub salt: u64,
    pub argument_signatures: Vec<CommandArgumentSignature<'a>>,
    pub message_count: VarInt,
    //// This is a bitset of 20; each bit represents one
    //// of the last 20 messages received and whether or not
    //// the message was acknowledged by the client
    pub acknowledgement: FixedBitSet<20, 3>,
}

#[derive(Copy, Clone, Debug, Encode, Decode)]
pub struct CommandArgumentSignature<'a> {
    pub argument_name: Bounded<&'a str, 16>,
    pub signature: &'a [u8; 256],
}