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

pub enum Item {
Show 23 variants Import(Vec<SassString>, ValueSourcePos), VariableDeclaration { name: String, val: Value, default: bool, global: bool, }, AtRoot(SelectorsVec<Item>), AtRule { name: SassString, args: Value, body: Option<Vec<Item>>, }, Debug(Value), Warn(Value), Error(ValueSourcePos), MixinDeclaration(StringFormalArgsVec<Item>, SourcePos), MixinCall(StringCallArgsOption<Vec<Item>>, SourcePos), 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(SassStringUseAsVec<(Name, Value, bool)>), Forward(SassStringUseAsExposeVec<(Name, Value, bool)>), Rule(SelectorsVec<Item>), NamespaceRule(SassStringValueVec<Item>), Property(SassStringValue), Comment(SassString), None,
}
Expand description

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

Variants

Import(Vec<SassString>, ValueSourcePos)

Tuple Fields

1: Value

An @import directive.

VariableDeclaration

Fields

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.

A variable declaration.

AtRoot(SelectorsVec<Item>)

Tuple Fields

1: Vec<Item>

An @at-root directive.

AtRule

Fields

name: SassString

The name of this directive

args: Value

Any arguments

body: Option<Vec<Item>>

The directive may have a body.

A generic @ directive.

Debug(Value)

Tuple Fields

0: Value

An @debug directive.

Warn(Value)

Tuple Fields

0: Value

An @warn directive.

Error(ValueSourcePos)

Tuple Fields

0: Value

An @error directive.

MixinDeclaration(StringFormalArgsVec<Item>, SourcePos)

Tuple Fields

0: String
2: Vec<Item>

A @mixin directive, declaring a mixin.

MixinCall(StringCallArgsOption<Vec<Item>>, SourcePos)

Tuple Fields

0: String

An @include directive, calling a mixin.

Content

An @content directive (in a mixin declaration).

FunctionDeclaration(StringFormalArgsSourcePosVec<Item>)

Tuple Fields

0: String
3: Vec<Item>

An @function declaration.

Return(Value)

Tuple Fields

0: Value

An @return statement in a function declaration.

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

Tuple Fields

0: Value
1: Vec<Item>
2: Vec<Item>

An @if conditional directive.

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

Tuple Fields

0: Vec<Name>
1: Value
2: Vec<Item>

An @each loop directive.

The value may be or evaluate to a list.

For

Fields

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.

An @for loop directive.

While(ValueVec<Item>)

Tuple Fields

0: Value
1: Vec<Item>

An @while loop directive.

Use(SassStringUseAsVec<(Name, Value, bool)>)

Tuple Fields

1: UseAs

An @use directive.

Forward(SassStringUseAsExposeVec<(Name, Value, bool)>)

Tuple Fields

1: UseAs
2: Expose

An @forward directive.

Rule(SelectorsVec<Item>)

Tuple Fields

1: Vec<Item>

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

NamespaceRule(SassStringValueVec<Item>)

Tuple Fields

1: Value
2: Vec<Item>

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

Property(SassStringValue)

Tuple Fields

1: Value

A sass property; a name and a value.

Comment(SassString)

Tuple Fields

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

None

Nothing

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.