Contents

AppEntity(_:)

Marks a transient entity whose values the model can generate on its own.

Declaration

@attached(extension, conformances: GenerableEntity) macro AppEntity(_ traits: AppEntityTraits)

Parameters

  • traits:

    The entity’s roles, such as .generable or [.generable].

Overview

Apply this macro to a structure or class that conforms to TransientAppEntity. It adds a GenerableEntity conformance, using the availability declared on the type, or the availability of GenerableEntity when the type declares none.

@AppEntity(.generable)
struct FlightSearch: TransientAppEntity { ... }

See Also

Entity support