pub trait NodeTrait {
    // Required methods
    fn is_text(&self) -> bool;
    fn is_safe_html(&self) -> bool;
    fn unwrap_text(&self) -> &str;
    fn unwrap_safe_html(&self) -> &str;
}
Expand description

additional traits for mt_dom::Node

Required Methods§

source

fn is_text(&self) -> bool

returns true if this is a text node

source

fn is_safe_html(&self) -> bool

returns true if this is text node with safe html as the content

source

fn unwrap_text(&self) -> &str

unwrap the text content of the text node, panics if it is not a text node

source

fn unwrap_safe_html(&self) -> &str

unwrap the html text content of this node, panics if it is not a safe html node

Implementors§

source§

impl<MSG> NodeTrait for Node<MSG>