use crate::{buffer::Buffer, packet::Packet}; #[derive(Debug, Clone)] pub struct NotifyConnectionInfo{ pub id: String } impl Packet for NotifyConnectionInfo{ fn to_buf(self) -> Buffer { let mut buf = Buffer::empty(); buf.set_u16(0); buf.set_str(self.id.clone()); buf } fn from_buf(buf: &mut Buffer) -> Self { Self { id: buf.get_str() } } }