pub trait NodeTrait {
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
fn is_safe_html(&self) -> bool
fn is_safe_html(&self) -> bool
returns true if this is text node with safe html as the content
fn unwrap_text(&self) -> &str
fn unwrap_text(&self) -> &str
unwrap the text content of the text node, panics if it is not a text node
fn unwrap_safe_html(&self) -> &str
fn unwrap_safe_html(&self) -> &str
unwrap the html text content of this node, panics if it is not a safe html node