chunkedge_protocol/packets/login/cookie_response_c2s.rs
1use std::borrow::Cow;
2
3use chunkedge_binary::{Bounded, Decode, Encode};
4use chunkedge_ident::Ident;
5
6use crate::{Packet, PacketState};
7
8#[derive(Clone, Debug, Encode, Decode, Packet)]
9#[packet(state = PacketState::Login)]
10/// Sent by the client to the server to respond to a
11/// [`CookieRequestS2c`](crate::packets::login::CookieRequestS2c) packet.
12pub struct CookieResponseC2s<'a> {
13 pub key: Ident<Cow<'a, str>>,
14 pub payload: Option<Bounded<&'a [u8], 5120>>,
15}