Trait ElementExt

Source
pub trait ElementExt {
    // Required methods
    fn get_child<K>(&self, k: K) -> Option<Node<'_, '_>>
       where K: AsRef<str>;
    fn get_child_text_opt<K>(&self, k: K) -> Result<Option<String>, SVDErrorAt>
       where K: AsRef<str>;
    fn get_child_text<K>(&self, k: K) -> Result<String, SVDErrorAt>
       where K: AsRef<str>;
    fn get_text(&self) -> Result<&str, SVDErrorAt>;
    fn get_child_elem(&self, n: &str) -> Result<Node<'_, '_>, SVDErrorAt>;
    fn get_child_u32(&self, n: &str) -> Result<u32, SVDErrorAt>;
    fn get_child_u64(&self, n: &str) -> Result<u64, SVDErrorAt>;
    fn get_child_bool(&self, n: &str) -> Result<bool, SVDErrorAt>;
    fn debug(&self);
}
Expand description

Defines extensions for implementation over roxmltree::Node

Required Methods§

Source

fn get_child<K>(&self, k: K) -> Option<Node<'_, '_>>
where K: AsRef<str>,

Source

fn get_child_text_opt<K>(&self, k: K) -> Result<Option<String>, SVDErrorAt>
where K: AsRef<str>,

Source

fn get_child_text<K>(&self, k: K) -> Result<String, SVDErrorAt>
where K: AsRef<str>,

Source

fn get_text(&self) -> Result<&str, SVDErrorAt>

Source

fn get_child_elem(&self, n: &str) -> Result<Node<'_, '_>, SVDErrorAt>

Source

fn get_child_u32(&self, n: &str) -> Result<u32, SVDErrorAt>

Source

fn get_child_u64(&self, n: &str) -> Result<u64, SVDErrorAt>

Source

fn get_child_bool(&self, n: &str) -> Result<bool, SVDErrorAt>

Source

fn debug(&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.

Implementations on Foreign Types§

Source§

impl ElementExt for Node<'_, '_>

Implements extensions for roxmltree::Node

Source§

fn get_text(&self) -> Result<&str, SVDErrorAt>

Get text contained by an XML Element

Source§

fn get_child_elem(&self, n: &str) -> Result<Node<'_, '_>, SVDErrorAt>

Get a named child element from an XML Element

Source§

fn get_child_u32(&self, n: &str) -> Result<u32, SVDErrorAt>

Get a u32 value from a named child element

Source§

fn get_child_u64(&self, n: &str) -> Result<u64, SVDErrorAt>

Get a u64 value from a named child element

Source§

fn get_child_bool(&self, n: &str) -> Result<bool, SVDErrorAt>

Get a bool value from a named child element

Source§

fn get_child<K>(&self, k: K) -> Option<Node<'_, '_>>
where K: AsRef<str>,

Source§

fn get_child_text_opt<K>(&self, k: K) -> Result<Option<String>, SVDErrorAt>
where K: AsRef<str>,

Source§

fn get_child_text<K>(&self, k: K) -> Result<String, SVDErrorAt>
where K: AsRef<str>,

Source§

fn debug(&self)

Implementors§