pub struct PrinterOptions<'a> {
    pub minify: bool,
    pub source_map: Option<&'a mut SourceMap>,
    pub targets: Option<Browsers>,
    pub analyze_dependencies: Option<DependencyOptions>,
    pub pseudo_classes: Option<PseudoClasses<'a>>,
}
Expand description

Options that control how CSS is serialized to a string.

Fields§

§minify: bool

Whether to minify the CSS, i.e. remove white space.

§source_map: Option<&'a mut SourceMap>

An optional reference to a source map to write mappings into.

§targets: Option<Browsers>

Browser targets to output the CSS for.

§analyze_dependencies: Option<DependencyOptions>

Whether to analyze dependencies (i.e. @import and url()). If true, the dependencies are returned as part of the ToCssResult.

When enabled, @import and url() dependencies are replaced with hashed placeholders that can be replaced with the final urls later (after bundling).

§pseudo_classes: Option<PseudoClasses<'a>>

A mapping of pseudo classes to replace with class names that can be applied from JavaScript. Useful for polyfills, for example.

Trait Implementations§

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 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.