struct LevelValues
Contains a user-friendly name for the levels as well as the language code.
-
User-friendly names for the level in each supported language. These names should be in sentence case and avoid words such as
arm
andarmed
. The first string in this list is used as the default name of the level and is displayed on devices with screens.Declaration
Swift
let levelSynonym: [String]
-
Language code for the synonym of the corresponding level.
Declaration
Swift
let languageCode: String
-
Creates a new Struct instance using data read from the given
TraitDecoder
.Throws
HomeError.parseError
when parsing fails.Declaration
Swift
init(decoder: TraitDecoder) throws
Parameters
decoder
The raw data representing this Struct.
-
Writes this Struct to the given
TraitEncoder
. ThrowsHomeError.parseError
if the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws
-
Returns the field corresponding to the given field ID.
Declaration
Swift
static func structField(id: UInt32) -> (any Field)?