pub struct CssParserOptions {
pub allow_wrong_line_comments: bool,
pub css_modules: bool,
pub grit_metavariables: bool,
}Fields§
§allow_wrong_line_comments: boolIf this is true, wrong comments starting with // will be treated
as a comment.
This option exists because there are so many css-in-js tools and people
use // as a comment because it’s javascript file.
Defaults to false.
css_modules: boolEnables parsing of CSS Modules specific features.
Defaults to false.
grit_metavariables: boolEnables parsing of Grit metavariables.
Defaults to false.
Implementations§
Source§impl CssParserOptions
impl CssParserOptions
Sourcepub fn allow_wrong_line_comments(self) -> Self
pub fn allow_wrong_line_comments(self) -> Self
Allows the parser to parse wrong line comments.
Sourcepub fn allow_css_modules(self) -> Self
pub fn allow_css_modules(self) -> Self
Enables parsing of css modules selectors.
Sourcepub fn allow_metavariables(self) -> Self
pub fn allow_metavariables(self) -> Self
Enables parsing of Grit metavariables.
Sourcepub fn is_css_modules_disabled(&self) -> bool
pub fn is_css_modules_disabled(&self) -> bool
Checks if parsing of CSS Modules features is disabled.
Sourcepub fn is_metavariable_enabled(&self) -> bool
pub fn is_metavariable_enabled(&self) -> bool
Checks if parsing of Grit metavariables is enabled.
Trait Implementations§
Source§impl Clone for CssParserOptions
impl Clone for CssParserOptions
Source§fn clone(&self) -> CssParserOptions
fn clone(&self) -> CssParserOptions
Returns a duplicate 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 CssParserOptions
impl Debug for CssParserOptions
Source§impl Default for CssParserOptions
impl Default for CssParserOptions
Source§fn default() -> CssParserOptions
fn default() -> CssParserOptions
Returns the “default value” for a type. Read more
impl Copy for CssParserOptions
Auto Trait Implementations§
impl Freeze for CssParserOptions
impl RefUnwindSafe for CssParserOptions
impl Send for CssParserOptions
impl Sync for CssParserOptions
impl Unpin for CssParserOptions
impl UnwindSafe for CssParserOptions
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