Skip to content

Enumeration

KeyPrefixingStrategy

A strategy describing how to apply a prefix to a FieldKey.
enum KeyPrefixingStrategy

Topics

Enumeration Cases

  • case camelCase
    Each key has its first character capitalized and the prefix is applied to the result.
  • case custom((FieldKey, FieldKey) -> FieldKey)
    A custom strategy - for each key, the closure is called with that key and the prefix with which the wrapper was initialized, and must return the field key to actually use. The closure must be “pure” (i.e. for any given pair of inputs it must always return the same result, in the same way that hash values must be consistent within a single execution context).
  • case none
    The “do nothing” strategy - the prefix is applied to each key by simple concatenation.
  • case snakeCase
    An underscore is placed between the prefix and each key.

Instance Properties

Instance Methods

Relationships

Conforms To

  • Swift.CustomStringConvertible
  • Swift.Sendable
  • Swift.SendableMetatype