pub trait NodeInfo {
// Required methods
fn is_element(&self) -> bool;
fn is_text_node(&self) -> bool;
}Expand description
Simple trait to provide basic information about the type of an element.
We avoid exposing the full type id, since computing it in the general case would be difficult for Gecko nodes.
Required Methods§
Sourcefn is_element(&self) -> bool
fn is_element(&self) -> bool
Whether this node is an element.
Sourcefn is_text_node(&self) -> bool
fn is_text_node(&self) -> bool
Whether this node is a text node.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".