pub fn to_bytes(&self) -> Vec<u8> {
        let mut res = Vec::with_capacity(4);
        let mut buf = varint_encode::u64_buffer();
        let version = varint_encode::u64(self.version.into(), &mut buf);
        res.extend_from_slice(version);
        let mut buf = varint_encode::u64_buffer();
        let codec = varint_encode::u64(self.codec, &mut buf);
        res.extend_from_slice(codec);
        let mut buf = varint_encode::u64_buffer();
        let mh_type = varint_encode::u64(self.mh_type, &mut buf);
        res.extend_from_slice(mh_type);
        let mut buf = varint_encode::u64_buffer();
        let mh_len = varint_encode::u64(self.mh_len as u64, &mut buf);
        res.extend_from_slice(mh_len);
        res
    }
/// Convert the prefix to encoded bytes.
Convert the prefix to encoded bytes.
Convert the prefix to encoded bytes .
pub fn to_bytes(&self) -> Vec<u8> {
        let mut res = Vec::with_capacity(4);
        let mut buf = varint_encode::u64_buffer();
        let version = varint_encode::u64(self.version.into(), &mut buf);
        res.extend_from_slice(version);
        let mut buf = varint_encode::u64_buffer();
        let codec = varint_encode::u64(self.codec, &mut buf);
        res.extend_from_slice(codec);
        let mut buf = varint_encode::u64_buffer();
        let mh_type = varint_encode::u64(self.mh_type, &mut buf);
        res.extend_from_slice(mh_type);
        let mut buf = varint_encode::u64_buffer();
        let mh_len = varint_encode::u64(self.mh_len as u64, &mut buf);
        res.extend_from_slice(mh_len);
        res
    }
pub fn to_bytes ( & self ) -> Vec < u8 > { let mut res = Vec :: with_capacity ( 4 ) ; let mut buf = varint_encode :: u64_buffer ( ) ; let version = varint_encode :: u64 ( self . version . into ( ) , & mut buf ) ; res . extend_from_slice ( version ) ; let mut buf = varint_encode :: u64_buffer ( ) ; let codec = varint_encode :: u64 ( self . codec , & mut buf ) ; res . extend_from_slice ( codec ) ; let mut buf = varint_encode :: u64_buffer ( ) ; let mh_type = varint_encode :: u64 ( self . mh_type , & mut buf ) ; res . extend_from_slice ( mh_type ) ; let mut buf = varint_encode :: u64_buffer ( ) ; let mh_len = varint_encode :: u64 ( self . mh_len as u64 , & mut buf ) ; res . extend_from_slice ( mh_len ) ; res }
Convert the prefix to encoded bytes.
Convert the prefix to encoded bytes .
&self
&self