chunkedge_protocol/packets/configuration/custom_payload_c2s.rs
1use std::borrow::Cow;
2
3use chunkedge_binary::{Bounded, Decode, Encode, RawBytes};
4use chunkedge_ident::Ident;
5
6use crate::{Packet, PacketState};
7
8#[derive(Clone, Debug, Encode, Decode, Packet)]
9#[packet(state = PacketState::Configuration)]
10/// A custom payload sent from the client to the server.
11/// You can read more about custom payloads [here](https://wiki.vg/Plugin_channels).
12pub struct CustomPayloadC2s<'a> {
13 pub channel: Ident<Cow<'a, str>>,
14 pub data: Bounded<RawBytes<'a>, 32767>,
15}