pub fn serialize<T>(val: &T) -> Result<Vec<u8>, WireError>where T: Serialize,
Serialize a value as bincode for transport across the FFI boundary.