StringKeyFormats for tuple types with a fixed element separator.
Represents an arbitrary string-typed key.
Conversion from T to StringKey for use in datastores, URLs, etc.
Conversion from T to StringKey for use in datastores, URLs, etc. The format must be stable. Changes must be backwards- and forwards-compatible so the string form of the key can be stored in databases and passed on the wire by different client versions.
These conversions must be invertible; that is, for val t: T
, reads(writes(t)) == Some(t)
.
StringKeyFormats for tuple types with a configuration element separator.
Represents an arbitrary string-typed key.
Classes should explicitly convert to this (rather than letting clients use
toString
to generate string versions of keys) as a signal that the key format must be stable and is not simply for debugging convenience.See StringKeyFormat for convenient conversion definitions.