[][src]Struct html5minify::Minifier

pub struct Minifier<'a, W: Write> { /* fields omitted */ }

Minifier implementation for io::Write.

Implementations

impl<'a, W> Minifier<'a, W> where
    W: Write
[src]

pub fn new(w: &'a mut W) -> Self[src]

Creates a new Minifier instance.

pub fn collapse_whitespace(&mut self, collapse: bool) -> &mut Self[src]

Collapse whitespace between elements and in text when whitespace isn't preserved by default. Enabled by default.

pub fn omit_doctype(&mut self, omit: bool) -> &mut Self[src]

Omit writing the HTML5 doctype. Disabled by default.

pub fn preserve_comments(&mut self, preserve: bool) -> &mut Self[src]

Preserve HTML comments. Disabled by default.

pub fn minify<R: Read>(&mut self, mut r: &mut R) -> Result<()>[src]

Minifies the given reader input.

Errors

Will return Err if unable to write to the output writer.

Auto Trait Implementations

impl<'a, W> RefUnwindSafe for Minifier<'a, W> where
    W: RefUnwindSafe
[src]

impl<'a, W> Send for Minifier<'a, W> where
    W: Send
[src]

impl<'a, W> Sync for Minifier<'a, W> where
    W: Sync
[src]

impl<'a, W> Unpin for Minifier<'a, W>[src]

impl<'a, W> !UnwindSafe for Minifier<'a, W>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.