Function simplicity::write_to_vec

source ·
pub fn write_to_vec<F>(f: F) -> Vec<u8>
where F: FnOnce(&mut BitWriter<&mut Vec<u8>>) -> Result<usize>,
Expand description

Write the result of a bit operation into a byte vector and return the vector.

I/O to a vector never fails.