RESPTranslator

public struct RESPTranslator

A helper object for translating between raw bytes and Swift types according to the Redis Serialization Protocol (RESP).

See https://redis.io/topics/protocol

  • Writes the value into the desired ByteBuffer in RESP format.

    Declaration

    Swift

    public func write<Value>(_ value: Value, into out: inout ByteBuffer) where Value : RESPValueConvertible

    Parameters

    value

    The value to write into the buffer.

    out

    The ByteBuffer that should be written to.