1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use crate::packet::*; use basin2_lib::Result; use bytes::BytesMut; use std::io::Error as IoError; use std::io::ErrorKind; hierarchy! { child<Handshake> enum HandshakeClientbound { } } impl PacketContainer for HandshakeClientbound { fn encode(self, _buf: &mut BytesMut) { match self {} } fn decode(id: i32, _buf: &mut BytesMut) -> Result<HandshakeClientbound> { match id { _ => Err(Box::new(IoError::from(ErrorKind::InvalidData))), } } }