Builder
@resultBuilder
public struct Builder<Child>
Generic result builder for converting blocks of Child... into [Child].
-
Declaration
Swift
public typealias Children = [Child] -
Declaration
Swift
public static func buildExpression(_ child: Child) -> Children -
This function is disfavored in case a builder wants to offer additional
buildExpressionfunctions to support multiple types in their builders.@_disfavoredOverloadallows the compiler to choose the other function whennilis built, instead of it being ambiguous.Declaration
Swift
@_disfavoredOverload public static func buildExpression(_ child: Child?) -> Children -
Allow for an array of
Childto be flattened into the overall result.Declaration
Swift
public static func buildExpression(_ children: [Child]) -> Children
View on GitHub
Builder Structure Reference