Trait PacketRead

Source
pub trait PacketRead {
    // Required method
    fn read_packet(&mut self) -> Result<(u8, Vec<u8>)>;
}
Expand description

A trait that provides the read_packet function to a type implementing std::io::Read.

Required Methods§

Source

fn read_packet(&mut self) -> Result<(u8, Vec<u8>)>

Read a packet and return the packet type and data.

Implementors§

Source§

impl<T: Read> PacketRead for T