pub fn from_values<T: DeserializeOwned>(values: Vec<Value>) -> Result<T>Expand description
Attempts to convert a Vec of values to any data type which can be deserialized. This is typically used with request_from_str to implement server behavior:
let val = r#"<?xml version=\"1.0\"?>
<methodCall>
<methodName>requestTopic</methodName>
<params>
<param><value>/rosout</value></param>
<param><value><int>42</int></value></param>
</params>
</methodCall>"#;
// Parse the request
let (method, vals) = serde_xmlrpc::request_from_str(val).unwrap();
// Now that we know what method is being called we can typecast our args
let (a, b): (String, i32) = serde_xmlrpc::from_values(vals).unwrap();