pub fn to_vec<T>(value: &T) -> Result<Vec<u8>, Error>where T: BorshSerialize + ?Sized,
Serialize an object into a vector of bytes.