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§

Returns the default parser options.

Returns the default at-rule parser.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Deserializes using the given deserializer

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type for metadata in pointers and references to Self.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.