pub fn to_vec<T: Serialize>(value: &T) -> Result<Vec<u8>> {
    let mut vec = Vec::new();

    to_writer(&mut vec, value)?;

    debug!("HEX Debug representation: {:?}", hex::encode(&vec));

    Ok(vec)
}
/// Serialize an instance of `T` as a ASN.1 DER byte vector.
Serialize an instance of `T` as a ASN.1 DER byte vector.
Serialize an instance of ` T ` as a ASN . 1 DER byte vector .
pub fn to_vec<T: Serialize>(value: &T) -> Result<Vec<u8>> {
    let mut vec = Vec::new();
    to_writer(&mut vec, value)?;
    debug!("HEX Debug representation: {:?}", hex::encode(&vec));
    Ok(vec)
}
pub fn to_vec < T : Serialize > ( value : & T ) -> Result < Vec < u8 > > { let mut vec = Vec :: new ( ) ; to_writer ( & mut vec , value ) ? ; debug ! ( " " hex encode ( vec ) ) ; Ok ( vec ) }
Serialize an instance of `T` as a ASN.1 DER byte vector.
Serialize an instance of ` T ` as a ASN . 1 DER byte vector .
value
&T
value
&T