Enum rsass::sass::Item[][src]

pub enum Item {
    Import(Vec<SassString>, ValueSourcePos),
    VariableDeclaration {
        name: String,
        val: Value,
        default: bool,
        global: bool,
    },
    AtRoot(SelectorsVec<Item>),
    AtRule {
        name: String,
        args: Value,
        body: Option<Vec<Item>>,
    },
    Debug(Value),
    Warn(Value),
    Error(Value),
    MixinDeclaration(StringFormalArgsVec<Item>),
    MixinCall(StringCallArgsVec<Item>),
    Content,
    FunctionDeclaration(StringFormalArgsSourcePosVec<Item>),
    Return(Value),
    IfStatement(ValueVec<Item>, Vec<Item>),
    Each(Vec<Name>, ValueVec<Item>),
    For {
        name: Name,
        from: Box<Value>,
        to: Box<Value>,
        inclusive: bool,
        body: Vec<Item>,
    },
    While(ValueVec<Item>),
    Use(SassStringUseAs),
    Rule(SelectorsVec<Item>),
    NamespaceRule(SassStringValueVec<Item>),
    Property(SassStringValue),
    Comment(SassString),
    None,
}

Every sass file is a sequence of sass items. Scoping items contains further sequences of items.

Variants

An @import directive.

VariableDeclaration

A variable declaration.

Fields of VariableDeclaration

name: String

The variable name

val: Value

The bound value

default: bool

true if this is a !default variable.

global: bool

true if this is a !global variable.

AtRoot(SelectorsVec<Item>)

An @at-root directive.

AtRule

A generic @ directive.

Fields of AtRule

name: String

The name of this directive

args: Value

Any arguments

body: Option<Vec<Item>>

The directive may have a body.

Debug(Value)

An @debug directive.

Warn(Value)

An @warn directive.

Error(Value)

An @error directive.

MixinDeclaration(StringFormalArgsVec<Item>)

A @mixin directive, declaring a mixin.

MixinCall(StringCallArgsVec<Item>)

An @include directive, calling a mixin.

Content

An @content directive (in a mixin declaration).

FunctionDeclaration(StringFormalArgsSourcePosVec<Item>)

An @function declaration.

Return(Value)

An @return statement in a function declaration.

IfStatement(ValueVec<Item>, Vec<Item>)

An @if conditional directive.

Each(Vec<Name>, ValueVec<Item>)

An @each loop directive.

The value may be or evaluate to a list.

For

An @for loop directive.

Fields of For

name: Name

The name of the iteration variable.

from: Box<Value>

The start value for the iteration.

to: Box<Value>

The end value for the iteration.

inclusive: bool

True if the end should be included in the range.

body: Vec<Item>

The body of the loop.

While(ValueVec<Item>)

An @while loop directive.

An @use directive.

Rule(SelectorsVec<Item>)

A sass rule; selectors followed by a block of items.

NamespaceRule(SassStringValueVec<Item>)

A sass namespace rule; a name followed by a block of properties.

Property(SassStringValue)

A sass property; a name and a value.

Comment(SassString)

A comment (that might be preserved for the output).

None

Nothing

Trait Implementations

impl Clone for Item[src]

impl Debug for Item[src]

impl Eq for Item[src]

impl PartialEq<Item> for Item[src]

impl PartialOrd<Item> for Item[src]

impl StructuralEq for Item[src]

impl StructuralPartialEq for Item[src]

Auto Trait Implementations

impl RefUnwindSafe for Item

impl Send for Item

impl Sync for Item

impl Unpin for Item

impl UnwindSafe for Item

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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