pub fn serialize<T: Serialize>(val: &T) -> Result<Vec<u8>, WireError>
Serialize a value using the active wire format.
Returns JSON bytes in debug builds, bincode bytes in release builds.