Trait html5ever_ext::NodeExt
[−]
[src]
pub trait NodeExt: Sized + Minify { fn validate_children_and_remove_comments_and_processing_instructions(
&self,
context: &Path
) -> Result<(), HtmlError>; fn parent(&self) -> Option<Self>; fn first_child(&self) -> Option<Self>; fn is_inter_element_whitespace_comment_or_processing_instruction(
&self
) -> bool; fn previous_sibling(
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self> { ... } fn next_sibling(
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self> { ... } }
This trait adds additional methods to a a HTML DOM node.
Required Methods
fn validate_children_and_remove_comments_and_processing_instructions(
&self,
context: &Path
) -> Result<(), HtmlError>
&self,
context: &Path
) -> Result<(), HtmlError>
Validated a HTML DOM node, removes any child comments and processing instructions.
fn parent(&self) -> Option<Self>
Returns the parent of this node. Returns None if there is no parent. Ordinarily, the 'root' node is of type 'Document'. The :root CSS pseudo-element matches the first html element node child of the root node of type 'Document', not 'Document' itself.
fn first_child(&self) -> Option<Self>
Returns the first child if extant, which may be an element, text node (or, if not preprocessed, a comment or processing instruction)
fn is_inter_element_whitespace_comment_or_processing_instruction(&self) -> bool
Used for determining siblings.
Provided Methods
fn previous_sibling(
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self>
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self>
Returns the previous sibling, or None if this is the first sibling
fn next_sibling(
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self>
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self>
Returns the next sibling, or None if this is the last sibling
Implementations on Foreign Types
impl NodeExt for Rc<Node>
[src]
fn validate_children_and_remove_comments_and_processing_instructions(
&self,
context: &Path
) -> Result<(), HtmlError>
[src]
&self,
context: &Path
) -> Result<(), HtmlError>
fn parent(&self) -> Option<Self>
[src]
fn first_child(&self) -> Option<Self>
[src]
fn is_inter_element_whitespace_comment_or_processing_instruction(&self) -> bool
[src]
fn previous_sibling(
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self>
[src]
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self>
fn next_sibling(
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self>
[src]
&self,
skip_inter_element_whitespace_comment_or_processing_instructions: bool
) -> Option<Self>