pub fn write<T>(t: &T) -> Result<Vec<u8>>where T: Serialize,
Serialize a value to a byte vector as CBOR.