[][src]Struct grass::Options

pub struct Options<'a> { /* fields omitted */ }

Configuration for Sass compilation

The simplest usage is grass::Options::default(); however, a builder pattern is also exposed to offer more control.

Implementations

impl<'a> Options<'a>[src]

#[must_use]pub fn style(self, style: OutputStyle) -> Self[src]

grass currently offers 2 different output styles

  • OutputStyle::Expanded writes each selector and declaration on its own line.
  • OutputStyle::Compressed removes as many extra characters as possible and writes the entire stylesheet on a single line.

By default, output is expanded.

#[must_use]pub fn quiet(self, quiet: bool) -> Self[src]

This flag tells Sass not to emit any warnings when compiling. By default, Sass emits warnings when deprecated features are used or when the @warn rule is encountered. It also silences the @debug rule.

By default, this value is false and warnings are emitted.

#[must_use]pub fn load_path(self, path: &'a Path) -> Self[src]

All Sass implementations allow users to provide load paths: paths on the filesystem that Sass will look in when locating modules. For example, if you pass node_modules/susy/sass as a load path, you can use @import "susy" to load node_modules/susy/sass/susy.scss.

Imports will always be resolved relative to the current file first, though. Load paths will only be used if no relative file exists that matches the module's URL. This ensures that you can't accidentally mess up your relative imports when you add a new library.

This method will append a single path to the list.

#[must_use]pub fn load_paths(self, paths: &'a [&'a Path]) -> Self[src]

Append multiple loads paths

Note that this method does not remove existing load paths

See Options::load_path for more information about load paths

#[must_use]pub fn allows_charset(self, allows_charset: bool) -> Self[src]

This flag tells Sass whether to emit a @charset declaration or a UTF-8 byte-order mark.

By default, Sass will insert either a @charset declaration (in expanded output mode) or a byte-order mark (in compressed output mode) if the stylesheet contains any non-ASCII characters.

#[must_use]pub fn unicode_error_messages(self, unicode_error_messages: bool) -> Self[src]

This flag tells Sass only to emit ASCII characters as part of error messages.

By default Sass will emit non-ASCII characters for these messages.

This flag does not affect the CSS output.

Trait Implementations

impl<'a> Debug for Options<'a>[src]

impl<'_> Default for Options<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Options<'a>

impl<'a> Send for Options<'a>

impl<'a> Sync for Options<'a>

impl<'a> Unpin for Options<'a>

impl<'a> UnwindSafe for Options<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,