[][src]Enum rsass::css::Value

pub enum Value {
    Bang(String),
    Call(StringCallArgs),
    Function(StringOption<SassFunction>),
    Literal(StringQuotes),
    List(Vec<Value>, ListSeparatorbool),
    Numeric(NumberUnitbool),
    Color(Rgba, Option<String>),
    Null,
    True,
    False,
    BinOp(Box<Value>, bool, Operator, boolBox<Value>),
    UnaryOp(Operator, Box<Value>),
    Map(OrderMap<Value, Value>),
    UnicodeRange(String),
}

A sass value.

Variants

Bang(String)

A special kind of escape. Only really used for !important.

Call(StringCallArgs)

An function call that was not evaluated.

Function(StringOption<SassFunction>)

A (callable?) function.

Literal(StringQuotes)List(Vec<Value>, ListSeparatorbool)

A comma- or space separated list of values, with or without brackets.

Numeric(NumberUnitbool)

A Numeric value is a rational value with a Unit (which may be Unit::None) and flags.

The boolean flag is true for calculated values and false for literal values.

Color(Rgba, Option<String>)NullTrueFalseBinOp(Box<Value>, bool, Operator, boolBox<Value>)

A binary operation, two operands and an operator. The booleans represents possible whitespace.

UnaryOp(Operator, Box<Value>)Map(OrderMap<Value, Value>)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.

Methods

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 hsla(h: Rational, s: Rational, l: Rational, a: Rational) -> Self[src]

pub fn type_name(&self) -> &'static str[src]

pub fn is_calculated(&self) -> bool[src]

pub fn into_calculated(self) -> Self[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 integer_value(&self) -> Result<isize, Error>[src]

pub fn unquote(self) -> Value[src]

pub fn unrequote(&self) -> Value[src]

pub fn iter_items(self) -> Vec<Value>[src]

Trait Implementations

impl Eq for Value[src]

impl Clone for Value[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialOrd<Value> for Value[src]

impl PartialEq<Value> for Value[src]

impl Ord for Value[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Debug for Value[src]

impl Display for Value[src]

Auto Trait Implementations

impl Send for Value

impl Sync for Value

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]