to_value

Function to_value 

Source
pub fn to_value<T>(value: T) -> Result<Value>
where T: Serialize,
Expand description

Convert a T into serde_xmlrpc::Value which is an enum that can represent any valid XML-RPC data.

ยงExample

#[derive(serde::Serialize)]
struct Custom {
    field: i32,
}

let param = Custom {
    field: 42
};

let _value = serde_xmlrpc::to_value(param).unwrap();