public struct RESPTranslator
A helper object for translating between raw bytes and Swift types according to the Redis Serialization Protocol (RESP).
Representation of a
Swift.Errorfound during RESP parsing.
ImportantAny of these errors should be considered a BUG.
If you believe this is a bug from theSee more
RESPTranslator, file a bug at https://www.gitlab.com/mordil/swift-redis-nio-client/issues
public enum ParsingError : LocalizedError
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.