Function serde_xml_rs::ser::to_string [−][src]
pub fn to_string<S: Serialize>(value: &S) -> Result<String, Error>
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);