pub fn response_to_string(params: impl Iterator<Item = Value>) -> Result<String>
Expand description

Attempt to serialize a xmlrpc response from a list of values. Each item in the list will be represented as a separate “param” in xmlrpc parlance.

use serde_xmlrpc::{response_to_string,Value};
let body = response_to_string(vec![Value::Int(42), Value::String("data".to_string())].into_iter()).unwrap();
assert_eq!(body,
r#"<?xml version="1.0" encoding="utf-8"?><methodResponse><params><param><value><int>42</int></value></param><param><value><string>data</string></value></param></params></methodResponse>"#
);