RespValue

sealed trait RespValue

Scala model of the RESP message types.

Instances of these classes are only used when a user runs a raw redis command and is interested in the output as Redis returns it (see Redis.exec). Most commonly however, messages will be instantiated directly via the Visitor[A] and Reader[A] mechanisms.

The BulkString instance is a little special, since it is always used to send messages to the server. Note however, that the base class is simply a forwarder and does not require that any intermediate byte array be allocated.

See https://redis.io/docs/reference/protocol-spec/

Companion:
object
class Object
trait Matchable
class Any
class Arr
class Error
object Null.type
class Num

Value members

Abstract methods

def pretty(nesting: Int, out: PrintStream): Unit

Pretty-print this RESP message instance, just like redis-cli would (except that we use zero-based indexing).

Pretty-print this RESP message instance, just like redis-cli would (except that we use zero-based indexing).

Concrete methods

def arr: IndexedSeq[RespValue]
def arrOpt: Option[IndexedSeq[RespValue]]
def bulkStrOpt: Option[BulkString]
def bytes: Array[Byte]
def isNull: Boolean
def num: Long
def numOpt: Option[Long]
def pretty: String
def str: String
def strOpt: Option[String]