Function serde_xml_rs::ser::to_string
source · [−]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);