Trait html5ever_ext::Minify [] [src]

pub trait Minify {
    fn debug_fmt<W: Write>(&self, f: &mut W) -> Result;
fn minify_to_file_path<P: AsRef<Path>>(
        &self,
        html_head_and_body_tags_are_optional: bool,
        collapse_whitespace: bool,
        html_file_path: P
    ) -> Result<(), HtmlError>;
fn minify_to_bytes(
        &self,
        html_head_and_body_tags_are_optional: bool,
        collapse_whitespace: bool
    ) -> Vec<u8>;
fn minify_to_writer<W: Write>(
        &self,
        html_head_and_body_tags_are_optional: bool,
        collapse_whitespace: bool,
        writer: W
    ) -> Result<()>; fn debug_string(&self) -> String { ... }
fn minify_to_string(
        &self,
        html_head_and_body_tags_are_optional: bool,
        collapse_whitespace: bool
    ) -> String { ... } }

Minifies and serializes a html5ever HTML DOM (RcDom) or node (Rc, aka Handle).

Required Methods

Identical to impl Debug's fmt() method, except we can't impl Debug for a trait and struct we don't own in this crate.

Minifies and serializes an instance of an HTML DOM to file. If creating AMP pages, set html_head_and_body_tags_are_optional to false. Wraps use of UltraMinifyingHtmlSerializer. If you need to serialize multiple RcDom or Node objects to the same writer, consider using UltraMinifyingHtmlSerializer directly.

Minifies and serializes an instance of an HTML DOM to a vector of bytes. If creating AMP pages, set html_head_and_body_tags_are_optional to false. For maximum efficiency at the cost of slight inaccuracy, set collapse_whitespace to true. (pre, code, samp and kbd are unaffected in any event). Wraps use of UltraMinifyingHtmlSerializer. If you need to serialize multiple RcDom or Node objects to the same writer, consider using UltraMinifyingHtmlSerializer directly.

Minifies and serializes an instance of an HTML DOM to a writer. If creating AMP pages, set html_head_and_body_tags_are_optional to false. For maximum efficiency at the cost of slight inaccuracy, set collapse_whitespace to true. (pre, code, samp and kbd are unaffected in any event). Wraps use of UltraMinifyingHtmlSerializer. If you need to serialize multiple RcDom or Node objects to the same writer, consider using UltraMinifyingHtmlSerializer directly.

Provided Methods

A debug string representing this node and any children.

Minifies and serializes an instance of an HTML DOM to String. If creating AMP pages, set html_head_and_body_tags_are_optional to false. For maximum efficiency at the cost of slight inaccuracy, set collapse_whitespace to true. (pre, code, samp and kbd are unaffected in any event). Wraps use of UltraMinifyingHtmlSerializer. If you need to serialize multiple RcDom or Node objects to the same writer, consider using UltraMinifyingHtmlSerializer directly.

Implementations on Foreign Types

impl Minify for Rc<Node>
[src]

[src]

[src]

[src]

[src]

[src]

[src]

Implementors