pub fn next_packet(&self) -> Option<Box<[u8]>> {
        match self.packets.front() {
            Some(packet_len) => {
                let slice = &self.buf[self.read_from..self.read_from + packet_len];
                Some(Box::from(slice))
            },
            None => None
        }
    }
/// Maybe gets the next complete packet that has been read and queued from the stream.
Maybe gets the next complete packet that has been read and queued from the stream.
Maybe gets the next complete packet that has been read and queued from the stream .
pub fn next_packet(&self) -> Option<Box<[u8]>> {
        match self.packets.front() {
            Some(packet_len) => {
                let slice = &self.buf[self.read_from..self.read_from + packet_len];
                Some(Box::from(slice))
            },
            None => None
        }
    }
pub fn next_packet ( & self ) -> Option < Box < [ u8 ] > > { match self . packets . front ( ) { Some ( packet_len ) => { let slice = & self . buf [ self . read_from .. self . read_from + packet_len ] ; Some ( Box :: from ( slice ) ) } , None => None } }
Maybe gets the next complete packet that has been read and queued from the stream.
Maybe gets the next complete packet that has been read and queued from the stream .
&self
&self