pub fn to_bundle_item(&self) -> Result<(Vec<u8>, Vec<u8>), Error> {
        let binary = self.serialize()?;
        let binary_len = binary.len();
        let mut header = Vec::<u8>::with_capacity(64);

        header.extend((binary_len as u64).to_le_bytes());
        header.extend(&[0u8; 24]);
        header.extend(&self.id.0);

        Ok((header, binary))
    }
/// Header is 64 bytes with first 32 for the size of the bytes le. Second
/// 32 is id, which is the hashed signature.
Header is 64 bytes with first 32 for the size of the bytes le. Second
32 is id, which is the hashed signature.
Header is 64 bytes with first 32 for the size of the bytes le . Second 32 is id which is the hashed signature .
pub fn to_bundle_item(&self) -> Result<(Vec<u8>, Vec<u8>), Error> {
        let binary = self.serialize()?;
        let binary_len = binary.len();
        let mut header = Vec::<u8>::with_capacity(64);
        header.extend((binary_len as u64).to_le_bytes());
        header.extend(&[0u8; 24]);
        header.extend(&self.id.0);
        Ok((header, binary))
    }
pub fn to_bundle_item ( & self ) -> Result < ( Vec < u8 > , Vec < u8 > ) , Error > { let binary = self . serialize ( ) ? ; let binary_len = binary . len ( ) ; let mut header = Vec :: < u8 > :: with_capacity ( 64 ) ; header . extend ( ( binary_len as u64 ) . to_le_bytes ( ) ) ; header . extend ( & [ 0u8 ; 24 ] ) ; header . extend ( & self . id . 0 ) ; Ok ( ( header , binary ) ) }
Header is 64 bytes with first 32 for the size of the bytes le.
Header is 64 bytes with first 32 for the size of the bytes le .
&self
&self