Contents

AppEnum

An interface to express that a custom type has a predefined, static set of valid values to display.

Declaration

protocol AppEnum : AppValue, StaticDisplayRepresentable, RawRepresentable where Self.RawValue : LosslessStringConvertible

Mentioned in

Overview

Adopt the AppEnum protocol in a type that has a known set of valid values. You might use this protocol to specify that a variable of one of your intents has a fixed set of possible values. For example, you might use a variable to specify whether to navigate to the next or previous track in a music playlist.

Because this type conforms to the StaticDisplayRepresentable protocol, provide a string-based representation of your type’s values in your implementation. For example, provide descriptions for each case of an enum type in the inherited caseDisplayRepresentations property.

Topics

Resolving the type

URL representation

See Also

App enum