Struct html_minifier::HTMLMinifierHelper
source · pub struct HTMLMinifierHelper {
pub remove_comments: bool,
pub minify_code: bool,
/* private fields */
}
Expand description
This struct helps you generate and minify your HTML code in the same time. The output destination is outside this struct.
Fields§
§remove_comments: bool
Remove HTML comments.
minify_code: bool
Minify the content in the code
element.
Implementations§
source§impl HTMLMinifierHelper
impl HTMLMinifierHelper
sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Reset this html minifier helper. The option settings and allocated memory will be be preserved.
sourcepub fn digest<S: AsRef<[u8]>, W: HTMLWriter>(
&mut self,
text: S,
out: &mut W
) -> Result<(), HTMLMinifierError>
pub fn digest<S: AsRef<[u8]>, W: HTMLWriter>( &mut self, text: S, out: &mut W ) -> Result<(), HTMLMinifierError>
Input some text to generate HTML code. It is not necessary to input a full HTML text at once.
Trait Implementations§
source§impl Clone for HTMLMinifierHelper
impl Clone for HTMLMinifierHelper
source§fn clone(&self) -> HTMLMinifierHelper
fn clone(&self) -> HTMLMinifierHelper
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HTMLMinifierHelper
impl Debug for HTMLMinifierHelper
Auto Trait Implementations§
impl RefUnwindSafe for HTMLMinifierHelper
impl Send for HTMLMinifierHelper
impl Sync for HTMLMinifierHelper
impl Unpin for HTMLMinifierHelper
impl UnwindSafe for HTMLMinifierHelper
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more