Response

The Response struct represents returned data from Redis.

Stores values true to form. Allows user code to query, cast, iterate, print, and log strings, ints, errors and all other return types.

The role of the Response struct is to make it simple, yet accurate to retrieve returned values from Redis. To aid this it implements D op* functions as well as little helper methods that simplify user facing code.

Members

Functions

opApply
int opApply(int delegate(size_t, Response) dg)

Support foreach(k, v; response)

opApply
int opApply(int delegate(Response) dg)

Support foreach(v; response)

opApplyReverse
int opApplyReverse(int delegate(size_t, Response) dg)

Support foreach_reverse(k, v; response)

opApplyReverse
int opApplyReverse(int delegate(Response) dg)

Support foreach_reverse(v; response)

opCast
T opCast()

Allows casting a Response to an integral, bool or string

opCast
C[] opCast()

Allows casting a Response to (u)byte[]

Properties

toBool
bool toBool [@property getter]

Attempts to check for truthiness of a Response.

toBytes
C[] toBytes [@property getter]

Attempts to convert a response to an array of bytes

toDiagnosticString
string toDiagnosticString [@property getter]

Returns the value of this Response as a string, along with type information

toInt
T toInt [@property getter]

Converts a Response to an integral (byte to long)

toString
string toString [@property getter]

Returns the value of this Response as a string

toStringArray
string[] toStringArray [@property getter]

Returns the value of this Response as a string array

Meta