Enum rsass::ScopeRef[][src]

pub enum ScopeRef {
    Builtin(&'static Scope),
    Dynamic(Arc<Scope>),
}
Expand description

A static or dynamic scope referece.

This dereferences to a Scope.

Variants

Builtin(&'static Scope)

Tuple Fields

0: &'static Scope

The builtin scopes in rsass is static.

Dynamic(Arc<Scope>)

Tuple Fields

0: Arc<Scope>

All other scopes are dynamic. This uses Arc reference counting.

Implementations

Create a new global scope.

A “global” scope is just a scope that have no parent. There will be multiple global scopes existing during the evaluation of a single sass file.

Create a new subscope of a given parent.

Create a new subscope of a given parent with selectors.

Check if a and b references the same scope.

Evaluate a body of items in this scope.

Methods from Deref<Target = Scope>

Define a module in the scope.

This is used by the @use statement.

Get a module.

This is used when refering to a function or variable with namespace.name notation.

Get the format used in this scope.

Define a none-default, non-global variable.

Define a variable with a value.

The $ sign is not included in name.

Define a variable in the global scope that is an ultimate parent of this scope.

Define multiple names from a value that is a list. Special case: in names is a single name, value is used directly.

Get the Value for a variable.

Get the value for a variable (or an error).

Copy a set of local variables to a temporary holder

Restore a set of local variables from a temporary holder

Get the global Value for a variable.

Get a mixin by name.

Returns the formal args and the body of the mixin.

Define a mixin.

Define a function.

Get a function by name.

Get the selectors active for this scope.

Get the functions of this scope as a Value::Map.

Get the variables of this scope as a Value::Map.

Get the forward scope for this scope.

Create a new one if necessary.

Get the forward scope for this scope.

Create a new one if necessary.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The resulting type after dereferencing.

Dereferences the value.

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.