Trait xso::IntoOptionalXmlText

source ·
pub trait IntoOptionalXmlText {
    // Required method
    fn into_optional_xml_text(self) -> Option<String>;
}
Expand description

Provide destruction of a value into optional XML text data.

Most likely, you don’t need to implement this; implement IntoXmlText instead (which automatically provides a IntoOptionalXmlText implementation).

This trait has to exist to handle the special-ness of Option<_> when it comes to values which don’t always exist.

Required Methods§

source

fn into_optional_xml_text(self) -> Option<String>

Destruct the value into an optional string.

Returning None causes the resulting XML object (likely an attribute, but maybe also an extracted child) to not appear in the output.

Implementations on Foreign Types§

source§

impl<T: IntoOptionalXmlText> IntoOptionalXmlText for Option<T>

Implementors§