pub struct CSSPurger { /* private fields */ }Expand description
Main CSS purger for removing unused CSS classes
Implementations§
Source§impl CSSPurger
impl CSSPurger
Sourcepub fn with_config(config: PurgeConfig) -> Self
pub fn with_config(config: PurgeConfig) -> Self
Create a new CSS purger with custom configuration
Sourcepub fn purge(
&mut self,
css: &str,
content_paths: &[String],
) -> Result<PurgeResult, PurgeError>
pub fn purge( &mut self, css: &str, content_paths: &[String], ) -> Result<PurgeResult, PurgeError>
Purge unused CSS from content
Sourcepub fn purge_advanced(
&mut self,
css: &str,
content_paths: &[String],
options: &PurgeOptions,
) -> Result<PurgeResult, PurgeError>
pub fn purge_advanced( &mut self, css: &str, content_paths: &[String], options: &PurgeOptions, ) -> Result<PurgeResult, PurgeError>
Purge with advanced options
Sourcepub fn get_statistics(&self) -> PurgeStatistics
pub fn get_statistics(&self) -> PurgeStatistics
Get purge statistics
Auto Trait Implementations§
impl Freeze for CSSPurger
impl RefUnwindSafe for CSSPurger
impl Send for CSSPurger
impl Sync for CSSPurger
impl Unpin for CSSPurger
impl UnwindSafe for CSSPurger
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more