Trait SerializeSync

Source
pub trait SerializeSync: Sized {
    type Error;

    // Required method
    fn serialize<W: Write>(
        &self,
        root: &str,
        writer: &mut Writer<W>,
    ) -> Result<(), Self::Error>;
}
Expand description

Trait that could be implemented by types to support serialization to XML using the quick_xml crate.

Required Associated Types§

Source

type Error

Error returned by the serialize method.

Required Methods§

Source

fn serialize<W: Write>( &self, root: &str, writer: &mut Writer<W>, ) -> Result<(), Self::Error>

Serializes the type to XML using the provided writer.

§Errors

Returns a suitable error if the operation was not successful.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§