Struct rsass::SassFunction
source · pub struct SassFunction { /* private fields */ }
Expand description
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§
source§impl SassFunction
impl SassFunction
sourcepub fn builtin(
args: Vec<(String, Value)>,
is_varargs: bool,
body: Arc<dyn Fn(&dyn Scope) -> Result<Value, Error> + Send + Sync>
) -> Self
pub fn builtin(
args: Vec<(String, Value)>,
is_varargs: bool,
body: Arc<dyn Fn(&dyn Scope) -> Result<Value, Error> + Send + Sync>
) -> Self
Create a new SassFunction
from a rust implementation.
sourcepub fn new(args: FormalArgs, body: Vec<Item>) -> Self
pub fn new(args: FormalArgs, body: Vec<Item>) -> Self
Create a new SassFunction
from a scss implementation.
Trait Implementations§
source§impl Clone for SassFunction
impl Clone for SassFunction
source§fn clone(&self) -> SassFunction
fn clone(&self) -> SassFunction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SassFunction
impl Debug for SassFunction
source§impl Ord for SassFunction
impl Ord for SassFunction
source§fn cmp(&self, other: &SassFunction) -> Ordering
fn cmp(&self, other: &SassFunction) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<SassFunction> for SassFunction
impl PartialEq<SassFunction> for SassFunction
source§fn eq(&self, other: &SassFunction) -> bool
fn eq(&self, other: &SassFunction) -> bool
source§impl PartialOrd<SassFunction> for SassFunction
impl PartialOrd<SassFunction> for SassFunction
source§fn partial_cmp(&self, other: &SassFunction) -> Option<Ordering>
fn partial_cmp(&self, other: &SassFunction) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more