[][src]Struct rsass::SassFunction

pub struct SassFunction { /* fields omitted */ }

A function that can be called from a sass value.

The function can be either "builtin" (implemented in rust) or "user defined" (implemented in scss).

Implementations

impl SassFunction[src]

pub fn builtin(
    args: Vec<(String, Value)>,
    is_varargs: bool,
    body: Arc<dyn Fn(&dyn Scope) -> Result<Value, Error> + Send + Sync>
) -> Self
[src]

Create a new SassFunction from a rust implementation.

pub fn new(args: FormalArgs, body: Vec<Item>) -> Self[src]

Create a new SassFunction from a scss implementation.

pub fn call(&self, scope: &dyn Scope, args: &CallArgs) -> Result<Value, Error>[src]

Call the function from a given scope and with a given set of arguments.

Trait Implementations

impl Clone for SassFunction[src]

impl Debug for SassFunction[src]

impl Eq for SassFunction[src]

impl Ord for SassFunction[src]

impl PartialEq<SassFunction> for SassFunction[src]

impl PartialOrd<SassFunction> for SassFunction[src]

impl StructuralEq for SassFunction[src]

impl StructuralPartialEq for SassFunction[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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