Library
Module
Module type
Parameter
Class
Class type
Hiredis_value provides access to the RESP value type
type t =
| Nil
| Error of string
| Integer of int64
| String of string
| Array of t array
| Status of string
val nil : t
Get a nil value
val string : string -> t
Convert an OCaml string to a Hiredis string
val int64 : int64 -> t
Convert an int64 to Hiredis number
val int : int -> t
Convert an int to Hiredis number
val error : string -> t
Create an error value
val status : string -> t
Create a status or "simple string" value
val is_nil : t -> bool
val is_error : t -> bool
val to_string : t -> string
to_string v
converts v
to a string, otherwise Invalid_value
is raised
val to_int64 : t -> int64
to_int64 v
converts v
to an int64, otherwise Invalid_value
is raised
val to_int : t -> int
to_int v
converts v
to an int, otherwise Invalid_value
is raised
val to_float : t -> float
to_float v
converts v
to a float, otherwise Invalid_value
is raised
to_array v
converts v
to an array of values if v
is an array value, * otherwise Invalid_value
is raised
to_list v
converts v
to a list of values if v
is an array value, * otherwise Invalid_value
is raised