chunkedge_protocol/packets/play/
custom_payload_c2s.rs

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