Enums
The following enums are available globally.
-
Mechanica
Base enum for static keys with a phantom type. Specialize this enum with a type and initialize it with a key, key path (both namespaced or not). - Note: Use
Key
to avoid stringly typed APIs.- simple: a
String
key or key path. - namespaced: a namespaced
String
key or key path.
See moreKey<String>("myKey1") // value: myKey1 Key<Int>("myKey2", namespace: "org.tinrobots") // value: org.tinrobots.myKey2 Key<Bool>("myKey2", namespace: "org.tinrobots") // value: org.tinrobots.myKey3
Declaration
Swift
public enum Key<T>: CustomStringConvertible
- simple: a