Struct lightningcss::stylesheet::ParserOptions
source · pub struct ParserOptions<'o, 'i, T = DefaultAtRuleParser> {
pub filename: String,
pub nesting: bool,
pub custom_media: bool,
pub css_modules: Option<Config<'o>>,
pub source_index: u32,
pub error_recovery: bool,
pub warnings: Option<Arc<RwLock<Vec<Error<ParserError<'i>>>>>>,
pub at_rule_parser: Option<T>,
}
Expand description
CSS parsing options.
Fields§
§filename: String
Filename to use in error messages.
nesting: bool
Whether the enable the CSS nesting draft syntax.
custom_media: bool
Whether to enable the custom media draft syntax.
css_modules: Option<Config<'o>>
Whether the enable CSS modules.
source_index: u32
The source index to assign to all parsed rules. Impacts the source map when the style sheet is serialized.
error_recovery: bool
Whether to ignore invalid rules and declarations rather than erroring.
warnings: Option<Arc<RwLock<Vec<Error<ParserError<'i>>>>>>
A list that will be appended to when a warning occurs.
at_rule_parser: Option<T>
A custom at rule parser.
Implementations§
source§impl<'o, 'i> ParserOptions<'o, 'i, DefaultAtRuleParser>
impl<'o, 'i> ParserOptions<'o, 'i, DefaultAtRuleParser>
sourcepub fn default_at_rule_parser() -> Option<DefaultAtRuleParser>
pub fn default_at_rule_parser() -> Option<DefaultAtRuleParser>
Returns the default at-rule parser.
Trait Implementations§
source§impl<'o, 'i, T: Clone> Clone for ParserOptions<'o, 'i, T>
impl<'o, 'i, T: Clone> Clone for ParserOptions<'o, 'i, T>
source§fn clone(&self) -> ParserOptions<'o, 'i, T>
fn clone(&self) -> ParserOptions<'o, 'i, T>
Returns a copy 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<'o, 'i, T: Debug> Debug for ParserOptions<'o, 'i, T>
impl<'o, 'i, T: Debug> Debug for ParserOptions<'o, 'i, T>
source§impl<'o, 'i, T: Default> Default for ParserOptions<'o, 'i, T>
impl<'o, 'i, T: Default> Default for ParserOptions<'o, 'i, T>
source§fn default() -> ParserOptions<'o, 'i, T>
fn default() -> ParserOptions<'o, 'i, T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'o, 'i, T> RefUnwindSafe for ParserOptions<'o, 'i, T>where
T: RefUnwindSafe,
impl<'o, 'i, T> Send for ParserOptions<'o, 'i, T>where
T: Send,
impl<'o, 'i, T> Sync for ParserOptions<'o, 'i, T>where
T: Sync,
impl<'o, 'i, T> Unpin for ParserOptions<'o, 'i, T>where
T: Unpin,
impl<'o, 'i, T> UnwindSafe for ParserOptions<'o, 'i, T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer