fn encode_binary<E: Encode>(val: &E) -> Result<Vec<u8>>Expand description
Helper function replacing bincode::encode_to_vec().
Bincode provides an encode_to_vec() function, but only under the alloc feature. For some
reason, enabling that feature pulls in a serde dependency, so re-implement it here.