Function reqwest_dav::re_exports::serde_xml_rs::to_string
source · pub fn to_string<S>(value: &S) -> Result<String, Error>where
S: Serialize,
Expand description
A convenience method for serializing some object to a string.
§Examples
#[derive(Serialize)]
struct Person {
name: String,
age: u32,
}
let joe = Person {name: "Joe".to_string(), age: 42};
let serialized = to_string(&joe).unwrap();
println!("{}", serialized);