pub struct ParserConfig {
pub allow_wrong_line_comments: bool,
pub css_modules: bool,
pub legacy_nesting: bool,
pub legacy_ie: 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: boolIf enabled, errors for css modules selectors will be ignored.
Defaults to false.
legacy_nesting: boolIf this is true, the nested selector starts with an identifier will be
parsed as valid selectors (i.e. ul { color: red; li { color: blue } })
Defaults to false.
legacy_ie: boolIf this is true, the legacy syntax for IE will be parsed.
Trait Implementations§
Source§impl Clone for ParserConfig
impl Clone for ParserConfig
Source§fn clone(&self) -> ParserConfig
fn clone(&self) -> ParserConfig
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 ParserConfig
impl Debug for ParserConfig
Source§impl Default for ParserConfig
impl Default for ParserConfig
Source§fn default() -> ParserConfig
fn default() -> ParserConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ParserConfig
impl<'de> Deserialize<'de> for ParserConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ParserConfig
impl Hash for ParserConfig
Source§impl Ord for ParserConfig
impl Ord for ParserConfig
Source§fn cmp(&self, other: &ParserConfig) -> Ordering
fn cmp(&self, other: &ParserConfig) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ParserConfig
impl PartialEq for ParserConfig
Source§impl PartialOrd for ParserConfig
impl PartialOrd for ParserConfig
Source§impl Serialize for ParserConfig
impl Serialize for ParserConfig
impl Copy for ParserConfig
impl Eq for ParserConfig
impl StructuralPartialEq for ParserConfig
Auto Trait Implementations§
impl Freeze for ParserConfig
impl RefUnwindSafe for ParserConfig
impl Send for ParserConfig
impl Sync for ParserConfig
impl Unpin for ParserConfig
impl UnwindSafe for ParserConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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