struct IfChainextension IfChain : Equatable, Hashable, Identifiable, Node, SendableA chain of IfThen clauses that can be extended with elseIf or ended with orElse.
-
The stable identity of the entity associated with this instance.
Declaration
Swift
let id: String -
The if-then clause of the
IfChain.Declaration
Swift
let ifThen: IfThen -
The else-if clauses of the
IfChain. These will execute in order if the if-then clause is false.Declaration
Swift
let elseIfThens: [IfThen] -
Adds an
elseIfclause to theIfChain.Declaration
Swift
func elseIf(_ condition: TypedExpression<Bool>, _ node: @escaping () -> any Node) -> IfChainParameters
conditionThe boolean
TypedExpressionthat must be true to proceed with the specifiednode.nodeA closure returning the
Nodeto proceed with if the condition is true.Return Value
The
IfChainwhich can be extended withelseIfor ended withorElse.