Expand description
Abstractions for reading the RESP protocol.
You can read a RESP stream in several ways. Which one is appropriate depends on your goals.
§Frames
With RespReader::frame
, you can read each individual frame from a RESP stream and decide
what to do with it. This allows you to process streams without buffering.
§Requests
RespReader::requests
will pass each component of a Redis-style request to a closure you
provide. This allows for easily sending each argument over a channel to another task.
§Values
You can also use RespReader::value
, which will buffer values and return a whole tree of
frames for arrays, maps, sets, etc. This is primarily meant for testing purposes, but could
also be useful in cases where performance isn’t super important.
Macros§
- Conveniently create a
RespValue
- Conveniently create a
RespPrimitive
Structs§
- Configuration of limits for reading a RESP stream. All values are shared across threads to prevent canceling futures.
- A wrapper for
AsyncRead
to allow reading a RESP stream, mainly in three ways. - A wrapper for
AsyncWrite
to allow writing a RESP stream.
Enums§
- An error encountered while reading a RESP stream.
- A single frame in a RESP stream.
- A primitive value that can be used as the key for a map or set.
- One piece of a RESP request, split into pieces for sending through a channel.
- A RESP value, possibly built from many frames.
- A version of the RESP protocol.