RedisHashFieldKey

public struct RedisHashFieldKey:
    RESPValueConvertible,
    RawRepresentable,
    ExpressibleByStringLiteral, ExpressibleByStringInterpolation,
    CustomStringConvertible, CustomDebugStringConvertible,
    Comparable, Hashable, Codable

A representation of a Redis hash field key.

RedisHashFieldKey is a thin wrapper around String to provide stronger type-safety at compile-time with regards to the domain semantics of any give String value.

It conforms to ExpressibleByStringLiteral and ExpressibleByStringInterpolation, so creating a hash field key is as simple as:

let fieldKey: RedisHashFieldKey = "foo" // or "\(someVar)"