Enum rsass::sass::Item [−][src]
pub enum Item {
Show 23 variants
Import(Vec<SassString>, Value, SourcePos),
VariableDeclaration {
name: String,
val: Value,
default: bool,
global: bool,
},
AtRoot(Selectors, Vec<Item>),
AtRule {
name: SassString,
args: Value,
body: Option<Vec<Item>>,
},
Debug(Value),
Warn(Value),
Error(Value, SourcePos),
MixinDeclaration(String, FormalArgs, Vec<Item>, SourcePos),
MixinCall(String, CallArgs, Option<Vec<Item>>, SourcePos),
Content,
FunctionDeclaration(String, FormalArgs, SourcePos, Vec<Item>),
Return(Value),
IfStatement(Value, Vec<Item>, Vec<Item>),
Each(Vec<Name>, Value, Vec<Item>),
For {
name: Name,
from: Box<Value>,
to: Box<Value>,
inclusive: bool,
body: Vec<Item>,
},
While(Value, Vec<Item>),
Use(SassString, UseAs, Vec<(Name, Value, bool)>),
Forward(SassString, UseAs, Expose, Vec<(Name, Value, bool)>),
Rule(Selectors, Vec<Item>),
NamespaceRule(SassString, Value, Vec<Item>),
Property(SassString, Value),
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>, Value, SourcePos)
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(Selectors, Vec<Item>)
An @at-root
directive.
AtRule
A generic @
directive.
Debug(Value)
Tuple Fields
0: Value
An @debug
directive.
Warn(Value)
Tuple Fields
0: Value
An @warn
directive.
Error(Value, SourcePos)
An @error
directive.
MixinDeclaration(String, FormalArgs, Vec<Item>, SourcePos)
A @mixin
directive, declaring a mixin.
MixinCall(String, CallArgs, Option<Vec<Item>>, SourcePos)
An @include
directive, calling a mixin.
Content
An @content
directive (in a mixin declaration).
FunctionDeclaration(String, FormalArgs, SourcePos, Vec<Item>)
An @function
declaration.
Return(Value)
Tuple Fields
0: Value
An @return
statement in a function declaration.
IfStatement(Value, Vec<Item>, Vec<Item>)
An @if
conditional directive.
Each(Vec<Name>, Value, 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.
inclusive: bool
True if the end should be included in the range.
An @for
loop directive.
While(Value, Vec<Item>)
An @while
loop directive.
Use(SassString, UseAs, Vec<(Name, Value, bool)>)
An @use
directive.
Forward(SassString, UseAs, Expose, Vec<(Name, Value, bool)>)
An @forward
directive.
Rule(Selectors, Vec<Item>)
A sass rule; selectors followed by a block of items.
NamespaceRule(SassString, Value, Vec<Item>)
A sass namespace rule; a name followed by a block of properties.
Property(SassString, Value)
A sass property; a name and a value.
Comment(SassString)
Tuple Fields
0: SassString
A comment (that might be preserved for the output).
None
Nothing
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Item
impl UnwindSafe for Item
Blanket Implementations
Mutably borrows from an owned value. Read more