Trait sass_alt::SassFunction [] [src]

pub trait SassFunction: Debug {
    fn signature(&self) -> SassFunctionSignature;
fn callback(
        &mut self,
        arguments: ListSassValue,
        compiler: SassCompiler
    ) -> Result<SassValue, SassValueError>; }

A type to model SASS functions.

Required Methods

The signature of this SASS function including its name, eg foo() or rgba($red, $green, $blue, $alpha) or mix($color-1, $color-2, $weight: 50%) (with a default for $weight). There are also four special signatures. See SassFunctionSignature. The fallback implementation will be given the name of the called function as the first argument, before all the original function arguments.

The implementation of this SASS function. Errors are converted into ErrorSassValue.

Implementors