chunkedge_protocol/packets/play/
custom_payload_s2c.rs

1use std::borrow::Cow;
2
3use chunkedge_binary::{Bounded, Decode, Encode, RawBytes};
4use chunkedge_ident::Ident;
5
6use crate::Packet;
7
8const MAX_PAYLOAD_SIZE: usize = 0x100000;
9
10#[derive(Clone, Debug, Encode, Decode, Packet)]
11pub struct CustomPayloadS2c<'a> {
12    pub channel: Ident<Cow<'a, str>>,
13    pub data: Bounded<RawBytes<'a>, MAX_PAYLOAD_SIZE>,
14}