Skip to main content

nurtex_protocol/packets/handshake/
enumeration.rs

1use nurtex_derive::PacketUnion;
2
3use crate::packets::handshake::packets::*;
4
5#[derive(Clone, Debug, PartialEq, PacketUnion)]
6pub enum ServersideHandshakePacket {
7  #[id = 0x00]
8  Greet(ServersideGreet),
9}
10
11// В состоянии Handshake нету Clientside пакетов
12#[derive(Clone, Debug, PartialEq)]
13pub enum ClientsideHandshakePacket {}
14
15impl crate::ProtocolPacket for ClientsideHandshakePacket {
16  fn id(&self) -> u32 {
17    match *self {}
18  }
19
20  fn read(_id: u32, _buf: &mut std::io::Cursor<&[u8]>) -> Option<Self> {
21    None
22  }
23
24  fn write(&self, _buf: &mut impl std::io::Write) -> std::io::Result<()> {
25    match *self {}
26  }
27}