RedisKey
public struct RedisKey:
RESPValueConvertible,
RawRepresentable,
ExpressibleByStringLiteral,
ExpressibleByStringInterpolation,
CustomStringConvertible, CustomDebugStringConvertible,
Comparable, Hashable, Codable
A representation of a key in Redis.
RedisKey
is a thin wrapper around String
, to provide stronger type-safety at compile-time.
It conforms to ExpressibleByStringLiteral
and ExpressibleByStringInterpolation
, so creating
a key is simple:
let key: RedisKey = "foo" // or "\(someVar)"
-
Declaration
Swift
public let rawValue: String
-
Initializes a type-safe representation of a key to a value in a Redis instance.
Declaration
Swift
public init(_ key: String)
Parameters
key
The key of a value in a Redis instance.
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public var debugDescription: String { get }
-
Declaration
Swift
public init?(fromRESP value: RESPValue)
-
Declaration
Swift
public init?(rawValue: String)
-
Declaration
Swift
public init(stringLiteral value: String)
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public static func < (lhs: RedisKey, rhs: RedisKey) -> Bool
-
Declaration
Swift
public func convertedToRESPValue() -> RESPValue
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Declaration
Swift
public enum Lifetime : Hashable