Documentation Language: Swift

Structure

MTLBinding

Represents a variable binding with an initialization expression.

struct MTLBinding

Overview

Bindings associate a variable with a value computed from an expression. They are used in let statements and for loops to bind variables in nested scopes.

Overview

MTL bindings serve multiple purposes:

Example Usage

// For loop binding
let loopVar = MTLVariable(name: "item", type: "Element")
let collectionExpr = MTLExpression(AQLNavigationExpression(...))
let forBinding = MTLBinding(
    variable: loopVar,
    initExpression: collectionExpr
)

// Let binding
let tempVar = MTLVariable(name: "fullName", type: "String")
let concatExpr = MTLExpression(AQLBinaryExpression(...))
let letBinding = MTLBinding(
    variable: tempVar,
    initExpression: concatExpr
)

Topics

Initializers

?
init(variable:initExpression:)

Creates a new MTL variable binding.

Instance Properties

V
initExpression

The expression that computes the variable’s value.

V
variable

The variable being bound.

Default Implementations

Relationships

Conforms To