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>

source§

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)

Performs copy-assignment from source. Read more
source§

impl<'o, 'i> Debug for ParserOptions<'o, 'i>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'o, 'i> Default for ParserOptions<'o, 'i>

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

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
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

source§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.