public struct RESPTranslator
A helper object for translating between raw bytes and Swift types according to the Redis Serialization Protocol (RESP).
Attempts to parse a
bufferwill have its reader index moved on a successful parse.
RESPTranslator.ParsingError.invalidTokenif the first byte is not an expected RESP Data Type token.
public func parseBytes(from buffer: inout ByteBuffer) throws -> RESPValue?
The buffer that contains the bytes that need to be parsed.