Trait svd_parser::elementext::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§
fn get_child<K>(&self, k: K) -> Option<Node<'_, '_>>
fn get_child_text_opt<K>(&self, k: K) -> Result<Option<String>, SVDErrorAt>
fn get_child_text<K>(&self, k: K) -> Result<String, SVDErrorAt>
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)
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<'a, 'input> ElementExt for Node<'a, 'input>
impl<'a, 'input> ElementExt for Node<'a, 'input>
Implements extensions for roxmltree::Node
source§fn 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
source§fn 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
source§fn 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
source§fn 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