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§
Sourcefn serialize<S: Serializer>(&self, serializer: S) -> Result<()>
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.