custom result-builder attributes
Swift ⟩ Attributes ⟩ Result Builders ⟩
Creating a result builder type creates a custom attribute with the same name.
custom attribute can be applied on:
function declaration:
variable/subscript declaration that includes a getter:
closure parameter in a function declaration:
the result builder builds the body of the function/getter/closure.
Applying a result builder attribute doesn’t impact ABI compatibility.
Applying a result builder attribute to a parameter does make that attribute part of the function’s interface, which can effect source compatibility.
Last updated
Was this helpful?