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

opCast
T opCast()

Attempts to check for truthiness of a Response.

opCast
T opCast()

Allows casting a Response to an integral or string

opCast
C[] opCast()

Attempts to convert a response to an array of bytes

toInt
T toInt()

Converts a Response to an integral (byte to long)

Properties

isArray
bool isArray [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isError
bool isError [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isInt
bool isInt [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isNil
bool isNil [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isStatus
bool isStatus [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isString
bool isString [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isValid
bool isValid [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
save
auto save [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
toDiagnosticString
string toDiagnosticString [@property getter]

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

toDiagnosticString
R toDiagnosticString [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString [@property getter]

Returns the value of this Response as a string

Static functions

parse
Response parse(char[] mb)

Parse a char array into a Response struct.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

type
ResponseType type;
Undocumented in source.

Meta