Struct lightningcss::stylesheet::ParserOptions
source · pub struct ParserOptions<'o, 'i> {
pub filename: String,
pub css_modules: Option<Config<'o>>,
pub source_index: u32,
pub error_recovery: bool,
pub warnings: Option<Arc<RwLock<Vec<Error<ParserError<'i>>>>>>,
pub flags: ParserFlags,
}
Expand description
CSS parsing options.
Fields§
§filename: String
Filename to use in error messages.
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.
flags: ParserFlags
Feature flags to enable.
Trait Implementations§
source§impl<'o, 'i> Clone for ParserOptions<'o, 'i>
impl<'o, 'i> Clone for ParserOptions<'o, 'i>
source§fn clone(&self) -> ParserOptions<'o, 'i>
fn clone(&self) -> ParserOptions<'o, 'i>
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> Debug for ParserOptions<'o, 'i>
impl<'o, 'i> Debug for ParserOptions<'o, 'i>
source§impl<'o, 'i> Default for ParserOptions<'o, 'i>
impl<'o, 'i> Default for ParserOptions<'o, 'i>
source§fn default() -> ParserOptions<'o, 'i>
fn default() -> ParserOptions<'o, 'i>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'o, 'i> Freeze for ParserOptions<'o, 'i>
impl<'o, 'i> RefUnwindSafe for ParserOptions<'o, 'i>
impl<'o, 'i> Send for ParserOptions<'o, 'i>
impl<'o, 'i> Sync for ParserOptions<'o, 'i>
impl<'o, 'i> Unpin for ParserOptions<'o, 'i>
impl<'o, 'i> UnwindSafe for ParserOptions<'o, 'i>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§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.
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<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>
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