Protocols
The following protocols are available globally.
-
An object capable of sending commands and receiving responses.
let client = ... let result = client.send(command: "GET", arguments: ["my_key"]) // result == EventLoopFuture<RESPValue>
For the full list of available commands, see https://redis.io/commands
See moreDeclaration
Swift
public protocol RedisClient
-
An object that is capable of being converted to and from
RESPValue
representations arbitrarily.Important
When conforming your types to be sent to a Redis server, it is expected to always be stored in a.bulkString
representation. Redis will reject any otherRESPValue
type sent to it.Conforming to this protocol only provides convenience methods of translating the Swift type into a
RESPValue
representation within the driver, and references to aRESPValueConvertible
instance should be short lived for that purpose.See
See moreRESPValue
.Declaration
Swift
public protocol RESPValueConvertible