FromXml

Trait FromXml 

Source
pub trait FromXml: Sized {
    // Required method
    fn from_xml(xml: impl Into<Bytes>) -> Result<Self>;
}
Expand description

Performs deserialization from XML.

This trait is automatically implemented for any type which implements the Element + for<'v> TryFrom<&'v Value, Error = Error> traits. As such, FromXml shouldn’t be implemented directly: Element and TryFrom<&Value> should be implemented instead, and you get the FromXml implementation for free.

Required Methods§

Source

fn from_xml(xml: impl Into<Bytes>) -> Result<Self>

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§

Source§

impl FromXml for Value

Source§

impl<E> FromXml for E
where E: Element + for<'v> TryFrom<&'v Value, Error = Error>,