pub fn to_writer<T, W: Write>(writer: W, value: &T) -> Result<()> where T: BorshSerialize + ?Sized,
Serializes an object directly into a Writer.
Writer