pub(crate) fn proto_error_to_int(e: Error) -> c_int