pub trait ProtocolPacketwhere
Self: Sized,{
// Required methods
fn id(&self) -> u32;
fn read(id: u32, buffer: &mut Cursor<&[u8]>) -> Option<Self>;
fn write(&self, buffer: &mut impl Write) -> Result<()>;
}Expand description
Трейт пакета протокола
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.