Trait Element

Source
pub trait Element {
    // Required methods
    fn tag(&self) -> Cow<'_, str>;
    fn serialize<S: Serializer>(&self, serializer: S) -> Result<()>;
}
Expand description

Element that can be serialized.

Required Methods§

Source

fn tag(&self) -> Cow<'_, str>

Tag for XML element

Source

fn serialize<S: Serializer>(&self, serializer: S) -> Result<()>

Called by serializer to let an element serialize its attributes and inner data (text and further elements).

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§