Function borsh::to_writer

source ·
pub fn to_writer<T, W: Write>(writer: W, value: &T) -> Result<()>
where T: BorshSerialize + ?Sized,
Expand description

Serializes an object directly into a Writer.

§Example

let stderr = std::io::stderr();
assert_eq!((), borsh::to_writer(&stderr, "hello_0x0a").unwrap());