pub fn to_vec<T>(value: &T) -> Result<Vec<u8>>where T: BorshSerialize + ?Sized,
Serialize an object into a vector of bytes.
assert_eq!(vec![12, 0, 0, 0, 0, 0, 0, 0], borsh::to_vec(&12u64).unwrap());