Skip to main content

to_xml_with_root

Function to_xml_with_root 

Source
pub fn to_xml_with_root<T>(root_tag: &str, value: &T) -> Result<Bytes>
where T: Serialize,
Expand description

Serializes a type to bytes with a specified root tag.

Automatically includes the XML declaration.