pub struct CrittersOptions {Show 17 fields
pub path: String,
pub public_path: String,
pub external: bool,
pub inline_threshold: u32,
pub minimum_external_size: u32,
pub prune_source: bool,
pub merge_stylesheets: bool,
pub additional_stylesheets: Vec<String>,
pub reduce_inline_styles: bool,
pub preload: PreloadStrategy,
pub noscript_fallback: bool,
pub inline_fonts: bool,
pub preload_fonts: bool,
pub keyframes: KeyframesStrategy,
pub compress: bool,
pub allow_rules: Vec<Matcher>,
pub exclude_external: Vec<Matcher>,
}Fields§
§path: StringBase path location of the CSS files
public_path: StringPublic path of the CSS resources. This prefix is removed from the href.
external: boolInline styles from external stylesheets
inline_threshold: u32Inline stylesheets smaller than a given size.
minimum_external_size: u32If the non-critical external stylesheet would be below this size, just inline it
prune_source: boolRemove inlined rules from the external stylesheet
merge_stylesheets: boolMerge inlined stylesheets into a single <style> tag
additional_stylesheets: Vec<String>Glob for matching other stylesheets to be used while looking for critical CSS.
reduce_inline_styles: boolOption indicates if inline styles should be evaluated for critical CSS. By default inline style tags will be evaluated and rewritten to only contain critical CSS. Set it to false to skip processing inline styles.
preload: PreloadStrategyWhich preload strategy to use.
noscript_fallback: boolAdd <noscript> fallback to JS-based strategies.
inline_fonts: boolInline critical font-face rules.
preload_fonts: boolPreloads critical fonts
keyframes: KeyframesStrategyControls which keyframes rules are inlined.
compress: boolCompress resulting critical CSS
allow_rules: Vec<Matcher>Provide a list of selectors that should be included in the critical CSS.
exclude_external: Vec<Matcher>List of external stylesheets that should be inlined without an external stylesheet reference. Links to these stylesheets will be removed, and only the matched selectors will be preserved.
Trait Implementations§
Source§impl Args for CrittersOptions
impl Args for CrittersOptions
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for CrittersOptions
impl Clone for CrittersOptions
Source§fn clone(&self) -> CrittersOptions
fn clone(&self) -> CrittersOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CrittersOptions
impl Debug for CrittersOptions
Source§impl Default for CrittersOptions
impl Default for CrittersOptions
Source§impl<'de> Deserialize<'de> for CrittersOptionswhere
CrittersOptions: Default,
impl<'de> Deserialize<'de> for CrittersOptionswhere
CrittersOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromArgMatches for CrittersOptions
impl FromArgMatches for CrittersOptions
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for CrittersOptions
impl RefUnwindSafe for CrittersOptions
impl Send for CrittersOptions
impl Sync for CrittersOptions
impl Unpin for CrittersOptions
impl UnwindSafe for CrittersOptions
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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