Skip to main content

XmlNodeExt

Trait XmlNodeExt 

Source
pub trait XmlNodeExt<'a> {
    // Required methods
    fn tag_name<'s, S: Source + ?Sized>(
        &self,
        source: &'s S,
    ) -> Option<Cow<'s, str>>;
    fn attributes<S: Source + ?Sized>(
        &self,
        source: &S,
    ) -> Vec<(String, String)>;
    fn xml_children(&self) -> impl Iterator<Item = RedNode<'a, XmlLanguage>>;
    fn xml_children_recursive(
        &self,
    ) -> impl Iterator<Item = RedNode<'a, XmlLanguage>>;
    fn text<S: Source + ?Sized>(&self, source: &S) -> String;
    fn read_attr<S: Source + ?Sized>(
        &self,
        source: &S,
        name: &str,
    ) -> Option<String>;
}

Required Methods§

Source

fn tag_name<'s, S: Source + ?Sized>( &self, source: &'s S, ) -> Option<Cow<'s, str>>

Source

fn attributes<S: Source + ?Sized>(&self, source: &S) -> Vec<(String, String)>

Source

fn xml_children(&self) -> impl Iterator<Item = RedNode<'a, XmlLanguage>>

Source

fn xml_children_recursive( &self, ) -> impl Iterator<Item = RedNode<'a, XmlLanguage>>

Source

fn text<S: Source + ?Sized>(&self, source: &S) -> String

Source

fn read_attr<S: Source + ?Sized>( &self, source: &S, name: &str, ) -> Option<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<'a> XmlNodeExt<'a> for RedNode<'a, XmlLanguage>

Source§

fn tag_name<'s, S: Source + ?Sized>( &self, source: &'s S, ) -> Option<Cow<'s, str>>

Source§

fn attributes<S: Source + ?Sized>(&self, source: &S) -> Vec<(String, String)>

Source§

fn xml_children(&self) -> impl Iterator<Item = RedNode<'a, XmlLanguage>>

Source§

fn xml_children_recursive( &self, ) -> impl Iterator<Item = RedNode<'a, XmlLanguage>>

Source§

fn text<S: Source + ?Sized>(&self, source: &S) -> String

Source§

fn read_attr<S: Source + ?Sized>( &self, source: &S, name: &str, ) -> Option<String>

Implementors§