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 from_bytes_verified_and_stripped_of_comments_and_processing_instructions_and_with_a_sane_doc_type<P: AsRef<Path>>(
        bytes: &[u8],
        context: P
    ) -> Result<Self, HtmlError>;
fn from_bytes(bytes: &[u8]) -> Self;
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 create_html5_document(
        &mut self,
        unattached_node: UnattachedNode
    ) -> Rc<Node>;
fn attach_to_document_node(
        &mut self,
        unattached_node: UnattachedNode
    ) -> Rc<Node>;
fn move_node_children_to_document_node(&mut self, node: &Rc<Node>);
fn move_node_to_document_node(&mut self, node: &Rc<Node>);
fn append_new_element_to_document_node(
        &mut self,
        qualified_name: QualName,
        attributes: Vec<Attribute>
    ) -> Rc<Node>;
fn append_new_comment_to_document_node(&mut self, comment: &str);
fn append_new_processing_instruction_to_document_node(
        &mut self,
        target: &str,
        data: &str
    );
fn append_text_to_document_node(&mut self, text: &str);
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>
    ) -> Rc<Node>;
fn append_new_element_before_sibling_node(
        &mut self,
        sibling_node: &Rc<Node>,
        qualified_name: QualName,
        attributes: Vec<Attribute>
    ) -> Rc<Node>;
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

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

Creates an instance of an HTML DOM from bytes

Verify that this HTML DOM is valid.

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

Adds this node preceded by a HTML5 DOCTYPE. Panics if the unattached_node is not called 'html'.

Attaches this node as a child of the document, ie as a root element node

Moves a node's children to the document node

Appends a new element node to the document node

Appends a new element node to the document node

Appends a new comment node to the document node

Appends a new processing instruction node to the document node

Appends a text node to the document node

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