fn to_net(&self) -> Vec<u8> {
        let mut vector = Vec::with_capacity(self.frame_size as usize);
        let frame_type = num_traits::ToPrimitive::to_u32(&self.frame_type)
            .unwrap()
            .to_le_bytes();
        vector.extend_from_slice(&self.protocol_version.to_le_bytes());
        vector.extend_from_slice(&self.frame_size.to_le_bytes());
        vector.extend_from_slice(&frame_type);
        vector.extend_from_slice(&self.payload);
        vector
    }
/// Export a netframe to vector stream
Export a netframe to vector stream
Export a netframe to vector stream
fn to_net(&self) -> Vec<u8> {
        let mut vector = Vec::with_capacity(self.frame_size as usize);
        let frame_type = num_traits::ToPrimitive::to_u32(&self.frame_type)
            .unwrap()
            .to_le_bytes();
        vector.extend_from_slice(&self.protocol_version.to_le_bytes());
        vector.extend_from_slice(&self.frame_size.to_le_bytes());
        vector.extend_from_slice(&frame_type);
        vector.extend_from_slice(&self.payload);
        vector
    }
fn to_net ( & self ) -> Vec < u8 > { let mut vector = Vec :: with_capacity ( self . frame_size as usize ) ; let frame_type = num_traits :: ToPrimitive :: to_u32 ( & self . frame_type ) . unwrap ( ) . to_le_bytes ( ) ; vector . extend_from_slice ( & self . protocol_version . to_le_bytes ( ) ) ; vector . extend_from_slice ( & self . frame_size . to_le_bytes ( ) ) ; vector . extend_from_slice ( & frame_type ) ; vector . extend_from_slice ( & self . payload ) ; vector }
Export a netframe to vector stream
Export a netframe to vector stream
&self