pub struct CssMinifierFeature { /* private fields */ }Expand description
Runtime feature flags for the CSS minifier, enabling individual transforms.
Implementations§
Source§impl CssMinifierFeature
impl CssMinifierFeature
Sourcepub const ReduceColors: CssMinifierFeature
pub const ReduceColors: CssMinifierFeature
Enables the ReduceColors transformer.
Sourcepub const ReduceLengths: CssMinifierFeature
pub const ReduceLengths: CssMinifierFeature
Enables the ReduceLengths transformer.
Sourcepub const ReduceTimeUnits: CssMinifierFeature
pub const ReduceTimeUnits: CssMinifierFeature
Enables the ReduceTimeUnits transformer.
Sourcepub const fn all_bits() -> Self
pub const fn all_bits() -> Self
Returns a bitmask that contains all values.
This will include bits that do not have any flags.
Use ::all_flags() if you only want to use flags.
Sourcepub const fn is_all_bits(&self) -> bool
pub const fn is_all_bits(&self) -> bool
Returns true if the bitmask contains all values.
This will check for bits == !0,
use .is_all_flags() if you only want to check for all flags
Sourcepub const fn is_all_flags(&self) -> bool
pub const fn is_all_flags(&self) -> bool
Returns true if the bitmask contains all flags.
This will fail if any unused bit is set,
consider using .truncate() first.
Sourcepub const fn all() -> Self
👎Deprecated: Please use the ::all_bits() constructor
pub const fn all() -> Self
::all_bits() constructorReturns a bitmask that contains all values.
This will include bits that do not have any flags.
Use ::all_flags() if you only want to use flags.
Sourcepub const fn is_all(&self) -> bool
👎Deprecated: Please use the .is_all_bits() method
pub const fn is_all(&self) -> bool
.is_all_bits() methodReturns true if the bitmask contains all values.
This will check for bits == !0,
use .is_all_flags() if you only want to check for all flags
Sourcepub const fn full() -> Self
👎Deprecated: Please use the ::all_flags() constructor
pub const fn full() -> Self
::all_flags() constructorReturns a bitmask that contains all flags.
Sourcepub const fn is_full(&self) -> bool
👎Deprecated: Please use the .is_all_flags() method
pub const fn is_full(&self) -> bool
.is_all_flags() methodReturns true if the bitmask contains all flags.
This will fail if any unused bit is set,
consider using .truncate() first.
Sourcepub const fn truncate(&self) -> Self
pub const fn truncate(&self) -> Self
Returns a bitmask that only has bits corresponding to flags
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Returns true if self intersects with any value in other,
or if other does not contain any values.
This is equivalent to (self & other) != 0 || other == 0.
Trait Implementations§
Source§impl Binary for CssMinifierFeature
impl Binary for CssMinifierFeature
Source§impl BitAnd for CssMinifierFeature
impl BitAnd for CssMinifierFeature
Source§impl BitAndAssign for CssMinifierFeature
impl BitAndAssign for CssMinifierFeature
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitOr for CssMinifierFeature
impl BitOr for CssMinifierFeature
Source§impl BitOrAssign for CssMinifierFeature
impl BitOrAssign for CssMinifierFeature
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitXor for CssMinifierFeature
impl BitXor for CssMinifierFeature
Source§impl BitXorAssign for CssMinifierFeature
impl BitXorAssign for CssMinifierFeature
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl Clone for CssMinifierFeature
impl Clone for CssMinifierFeature
Source§fn clone(&self) -> CssMinifierFeature
fn clone(&self) -> CssMinifierFeature
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CssMinifierFeature
impl Debug for CssMinifierFeature
Source§impl Default for CssMinifierFeature
impl Default for CssMinifierFeature
Source§impl From<CssMinifierFeature> for u16
impl From<CssMinifierFeature> for u16
Source§fn from(val: CssMinifierFeature) -> u16
fn from(val: CssMinifierFeature) -> u16
Source§impl From<u16> for CssMinifierFeature
impl From<u16> for CssMinifierFeature
Source§impl Hash for CssMinifierFeature
impl Hash for CssMinifierFeature
Source§impl LowerHex for CssMinifierFeature
impl LowerHex for CssMinifierFeature
Source§impl Not for CssMinifierFeature
impl Not for CssMinifierFeature
Source§impl Octal for CssMinifierFeature
impl Octal for CssMinifierFeature
Source§impl Ord for CssMinifierFeature
impl Ord for CssMinifierFeature
Source§fn cmp(&self, other: &CssMinifierFeature) -> Ordering
fn cmp(&self, other: &CssMinifierFeature) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq<u16> for CssMinifierFeature
impl PartialEq<u16> for CssMinifierFeature
Source§impl PartialEq for CssMinifierFeature
impl PartialEq for CssMinifierFeature
Source§impl PartialOrd for CssMinifierFeature
impl PartialOrd for CssMinifierFeature
Source§impl<'a, 'ctx, N> Transform<'a, 'ctx, CssMetadata, N, CssMinifierFeature> for ReduceColors<'a, 'ctx, N>where
N: Visitable + NodeWithMetadata<CssMetadata>,
impl<'a, 'ctx, N> Transform<'a, 'ctx, CssMetadata, N, CssMinifierFeature> for ReduceColors<'a, 'ctx, N>where
N: Visitable + NodeWithMetadata<CssMetadata>,
fn may_change(features: CssMinifierFeature, _node: &N) -> bool
fn new( transformer: &'ctx Transformer<'a, CssMetadata, N, CssMinifierFeature>, ) -> Self
Source§impl<'a, 'ctx, N> Transform<'a, 'ctx, CssMetadata, N, CssMinifierFeature> for ReduceLengths<'a, 'ctx, N>where
N: Visitable + NodeWithMetadata<CssMetadata>,
impl<'a, 'ctx, N> Transform<'a, 'ctx, CssMetadata, N, CssMinifierFeature> for ReduceLengths<'a, 'ctx, N>where
N: Visitable + NodeWithMetadata<CssMetadata>,
fn may_change(features: CssMinifierFeature, _node: &N) -> bool
fn new( transformer: &'ctx Transformer<'a, CssMetadata, N, CssMinifierFeature>, ) -> Self
Source§impl<'a, 'ctx, N> Transform<'a, 'ctx, CssMetadata, N, CssMinifierFeature> for ReduceTimeUnits<'a, 'ctx, N>where
N: Visitable + NodeWithMetadata<CssMetadata>,
impl<'a, 'ctx, N> Transform<'a, 'ctx, CssMetadata, N, CssMinifierFeature> for ReduceTimeUnits<'a, 'ctx, N>where
N: Visitable + NodeWithMetadata<CssMetadata>,
fn may_change(features: CssMinifierFeature, _node: &N) -> bool
fn new( transformer: &'ctx Transformer<'a, CssMetadata, N, CssMinifierFeature>, ) -> Self
Source§impl<N> TransformerFeatures<CssMetadata, N> for CssMinifierFeaturewhere
N: Visitable + NodeWithMetadata<CssMetadata>,
impl<N> TransformerFeatures<CssMetadata, N> for CssMinifierFeaturewhere
N: Visitable + NodeWithMetadata<CssMetadata>,
fn transforms<'a, 'ctx>( self, transformer: &'ctx Transformer<'a, CssMetadata, N, Self>, node: &N, )
Source§impl UpperHex for CssMinifierFeature
impl UpperHex for CssMinifierFeature
impl Copy for CssMinifierFeature
impl Eq for CssMinifierFeature
impl StructuralPartialEq for CssMinifierFeature
Auto Trait Implementations§
impl Freeze for CssMinifierFeature
impl RefUnwindSafe for CssMinifierFeature
impl Send for CssMinifierFeature
impl Sync for CssMinifierFeature
impl Unpin for CssMinifierFeature
impl UnwindSafe for CssMinifierFeature
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more