poem_openapi::types

Trait ToXML

Source
pub trait ToXML: Type {
    // Required method
    fn to_xml(&self) -> Option<Value>;

    // Provided method
    fn to_xml_string(&self) -> String { ... }
}
Expand description

Represents a type that can converted to XML value.

Required Methods§

Source

fn to_xml(&self) -> Option<Value>

Convert this value to Value.

Provided Methods§

Source

fn to_xml_string(&self) -> String

Convert this value to XML string.

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.

Implementations on Foreign Types§

Source§

impl ToXML for Value

Source§

impl ToXML for i8

Source§

impl ToXML for i16

Source§

impl ToXML for i32

Source§

impl ToXML for i64

Source§

impl<T: ToXML> ToXML for &T

Source§

impl<T: ToXML> ToXML for Box<T>

Source§

impl<T: ToXML> ToXML for Arc<T>

Implementors§

Source§

impl<T: Serialize + Send + Sync> ToXML for Any<T>