Trait html5ever_ext::RcDomExt [] [src]

pub trait RcDomExt: Sized + Minify {
    fn from_file_path_verified_and_stripped_of_comments_and_processing_instructions_and_with_a_sane_doc_type<P: AsRef<Path>>(
        html_document_file_path: P
    ) -> Result<Self, HtmlError>;
fn from_file_path<P: AsRef<Path>>(file_path: P) -> Result<Self, HtmlError>;
fn verify(&self, context: &Path) -> Result<(), HtmlError>;
fn recursively_strip_nodes_of_comments_and_processing_instructions_and_create_sane_doc_type(
        &self,
        context: &Path
    ) -> Result<(), HtmlError>;
fn move_node_children_to_parent_node(
        &mut self,
        parent_node: &Rc<Node>,
        node: &Rc<Node>
    );
fn move_node_to_parent_node(
        &mut self,
        parent_node: &Rc<Node>,
        node: &Rc<Node>
    );
fn move_node_before_sibling_node(
        &mut self,
        sibling_node: &Rc<Node>,
        node: &Rc<Node>
    );
fn append_new_element_to_parent_node(
        &mut self,
        parent_node: &Rc<Node>,
        qualified_name: QualName,
        attributes: Vec<Attribute>
    );
fn append_new_element_before_sibling_node(
        &mut self,
        sibling_node: &Rc<Node>,
        qualified_name: QualName,
        attributes: Vec<Attribute>
    );
fn append_new_comment_to_parent_node(
        &mut self,
        parent_node: &Rc<Node>,
        comment: &str
    );
fn append_new_comment_before_sibling_node(
        &mut self,
        sibling_node: &Rc<Node>,
        comment: &str
    );
fn append_new_processing_instruction_to_parent_node(
        &mut self,
        parent_node: &Rc<Node>,
        target: &str,
        data: &str
    );
fn append_new_processing_instruction_before_sibling_node(
        &mut self,
        sibling_node: &Rc<Node>,
        target: &str,
        data: &str
    );
fn append_text_to_parent_node(&mut self, parent_node: &Rc<Node>, text: &str);
fn append_text_before_sibling_node(
        &mut self,
        sibling_node: &Rc<Node>,
        text: &str
    ); }

This trait adds additional methods to a HTML DOM.

Required Methods

Creates an instance of an HTML DOM from a file path which is verified, stripped and with a sane DocType.

Creates an instance of an HTML DOM from a file path

Verify that this HTML DOM is valid.

Remove all comments and processing instructions and make the DOCTYPE a simple 'html' (for HTML 5).

Moves a node's children to another parent node

Moves an existing element node to a parent node

Moves an existing element before a sibling node

Appends a new element node to a parent node

Appends a new element before a sibling node

Appends a new comment node to a parent node

Appends a new comment before a sibling node

Appends a new processing instruction node to a parent node

Appends a new processing instruction before a sibling node

Appends a text node to a parent node

Appends a text node before a sibling node

Implementors