Trait svd_parser::elementext::ElementExt
source · [−]pub trait ElementExt {
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
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>
Implementations on Foreign Types
sourceimpl<'a, 'input> ElementExt for Node<'a, 'input>
impl<'a, 'input> ElementExt for Node<'a, 'input>
Implements extensions for roxmltree::Node
sourcefn get_text(&self) -> Result<&str, SVDErrorAt>
fn get_text(&self) -> Result<&str, SVDErrorAt>
Get text contained by an XML Element
sourcefn get_child_elem(&self, n: &str) -> Result<Node<'_, '_>, SVDErrorAt>
fn get_child_elem(&self, n: &str) -> Result<Node<'_, '_>, SVDErrorAt>
Get a named child element from an XML Element
sourcefn get_child_u32(&self, n: &str) -> Result<u32, SVDErrorAt>
fn get_child_u32(&self, n: &str) -> Result<u32, SVDErrorAt>
Get a u32 value from a named child element
sourcefn get_child_u64(&self, n: &str) -> Result<u64, SVDErrorAt>
fn get_child_u64(&self, n: &str) -> Result<u64, SVDErrorAt>
Get a u64 value from a named child element
sourcefn get_child_bool(&self, n: &str) -> Result<bool, SVDErrorAt>
fn get_child_bool(&self, n: &str) -> Result<bool, SVDErrorAt>
Get a bool value from a named child element