pub trait Packet {
// Required methods
fn print(&self) -> Result<(), Box<dyn Error>>;
fn debug(&self);
fn to_bytes(&self) -> Result<Vec<u8>, Box<dyn Error>>;
}
Expand description
Packets both with and without a payload must implement these traits
Required Methods§
fn print(&self) -> Result<(), Box<dyn Error>>
fn debug(&self)
fn to_bytes(&self) -> Result<Vec<u8>, Box<dyn Error>>
Implementors§
impl Packet for PacketNoPayload<'_>
Implement the Packet trait for PacketNoPayload
impl Packet for PacketWithPayload<'_>
Implement the Packet trait for PacketWithPayload