Expression
public struct Expression : Codable, CustomStringConvertible, Equatable
An Expression
defines a formula for computing the value of any layout property, paint property,
or filter within a map style. Expressions allow you to style data with multiple feature
properties at once, apply conditional logic, and manipulate data with mathematical, logical, and
string operators. This allows for sophisticated runtime styling.
-
The operator of this expression If the expression starts with an argument instead of an operator then return the first operator of a contained expression if available.
Declaration
Swift
public var `operator`: Operator { get }
-
The arguments contained in this expression
Declaration
Swift
public var arguments: [Argument] { get }
-
Create an operator-only expression.
Declaration
Swift
public init(_ op: Operator)
-
Initialize an expression with only arguments
Declaration
Swift
public init(@ExpressionArgumentBuilder content: () -> [Expression.Argument])
-
Initialize an expression with only arguments
Declaration
Swift
public init(arguments: [Argument])
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
An
See moreExpressionElement
can be either aop
(associated with aString
) OR anargument
(associated with anExpressionArgument
)Declaration
Swift
public indirect enum Element : Codable, CustomStringConvertible, Equatable
-
An
See moreExpressionArgument
is either a literal (associated with a double, string, boolean, or null value) or anotherExpression
Declaration
Swift
public indirect enum Argument : Codable, CustomStringConvertible, Equatable
-
Undocumented
See moreDeclaration
Swift
enum Operator : String, Codable, CaseIterable
-
Undocumented
See moreDeclaration
Swift
public enum Option : Codable, Equatable