/// Convert an object into CBOR binary.
Convert an object into CBOR binary.
Convert an object into CBOR binary .
pub(crate) fn into_cbor<R: Serialize>(r: &R) -> Vec<u8> {
    let mut ser = serde_cbor::Serializer::new(Vec::new());
    ser.self_describe().expect("Could not write magic tag.");
    r.serialize(&mut ser).expect("Serialization failed.");
    ser.into_inner()
}
pub ( crate ) fn into_cbor < R : Serialize > ( r : & R ) -> Vec < u8 > { let mut ser = serde_cbor :: Serializer :: new ( Vec :: new ( ) ) ; ser . self_describe ( ) . expect ( " " ) ; r . serialize ( & mut ser ) . expect ( " " ) ; ser . into_inner ( ) }
Convert an object into CBOR binary.
Convert an object into CBOR binary .
r
&R