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>; }
This trait adds additional methods to a HTML DOM.
Required Methods
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>
html_document_file_path: P
) -> Result<Self, HtmlError>
Creates an instance of an HTML DOM from a file path which is verified, stripped and with a sane DocType.
fn from_file_path<P: AsRef<Path>>(file_path: P) -> Result<Self, HtmlError>
Creates an instance of an HTML DOM from a file path
fn verify(&self, context: &Path) -> Result<(), HtmlError>
Verify that this HTML DOM is valid.
fn recursively_strip_nodes_of_comments_and_processing_instructions_and_create_sane_doc_type(
&self,
context: &Path
) -> Result<(), HtmlError>
&self,
context: &Path
) -> Result<(), HtmlError>
Remove all comments and processing instructions and make the DOCTYPE a simple 'html' (for HTML 5).
Implementors
impl RcDomExt for RcDom