pub struct Embedded { /* private fields */ }
Expand description

The sass-embedded compiler for rust host.

Implementations

Creates a sass-embedded compiler and connects with the dart-sass-embedded.

let mut sass = sass_embedded::Sass::new("path/to/sass_embedded").unwrap();

Compiles the Sass file at path to CSS. If it succeeds it returns a CompileResult, and if it fails it throws an [Exception].

use sass_embedded::{Sass, Options};

let mut sass = Sass::new("path/to/sass_embedded").unwrap();
let res = sass.compile("../styles/a.scss", Options::default()).unwrap();

More information:

Compiles a stylesheet whose contents is source to CSS. If it succeeds it returns a CompileResult, and if it fails it throws an [Exception].

use sass_embedded::{Sass, StringOptions};

let mut sass = Sass::new("path/to/sass_embedded").unwrap();
let res = sass.compile_string("a {b: c}", StringOptions::default()).unwrap();

More information:

Gets the version of the sass-embedded compiler.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

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