[−][src]Enum rsass::sass::Value
A sass value.
Variants
Bang(String)
A special kind of escape. Only really used for !important.
Call(SassString, CallArgs)
A call has a name and an argument (which may be multi).
Literal(SassString)
List(Vec<Value>, ListSeparator, bool)
A comma- or space separated list of values, with or without brackets.
A Numeric value is a rational value with a Unit (which may be Unit::None) and flags.
A NumericBig value is a rational value with a Unit (which may be Unit::None) and flags. The numerator and denominator of the value may be arbitrarily large.
"(a/b) and a/b differs semantically. Parens means the value should be evaluated numerically if possible, without parens / is not allways division. The boolean tells if the paren itself should be kept for output.
Variable(String)
Both a numerical and original string representation, since case and length should be preserved (#AbC vs #aabbcc).
A binary operation, two operands and an operator. The boolean represents possible whitespace.
A map in sass source is just a list of key/value parirs. Actual map behaviour comes after evaluating it.
The magic value "&", exanding to the current selectors.
UnicodeRange(String)
A unicode range for font selections. U+NN, U+N?, U+NN-MM. The string is the entire value, including the "U+" tag.
Implementations
impl Value
[src]
pub fn scalar(v: isize) -> Self
[src]
pub fn bool(v: bool) -> Self
[src]
pub fn black() -> Self
[src]
pub fn rgba(r: Rational, g: Rational, b: Rational, a: Rational) -> Self
[src]
pub fn type_name(&self) -> &'static str
[src]
pub fn is_true(&self) -> bool
[src]
All values other than False
and Null
should be considered true.
pub fn is_null(&self) -> bool
[src]
pub fn evaluate(&self, scope: &dyn Scope) -> Result<Value, Error>
[src]
pub fn do_evaluate(
&self,
scope: &dyn Scope,
arithmetic: bool
) -> Result<Value, Error>
[src]
&self,
scope: &dyn Scope,
arithmetic: bool
) -> Result<Value, Error>
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl Eq for Value
[src]
impl Ord for Value
[src]
fn cmp(&self, other: &Value) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Value> for Value
[src]
impl PartialOrd<Value> for Value
[src]
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
[src]
fn lt(&self, other: &Value) -> bool
[src]
fn le(&self, other: &Value) -> bool
[src]
fn gt(&self, other: &Value) -> bool
[src]
fn ge(&self, other: &Value) -> bool
[src]
impl StructuralEq for Value
[src]
impl StructuralPartialEq for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,