package resp

  1. Overview
  2. Docs

REdis Serialization Protocol library for OCaml

%%VERSLwtN%% — homepage

Resp

type t = [
  1. | `Nil
  2. | `Integer of int64
  3. | `String of string
  4. | `Error of string
  5. | `Bulk of string
  6. | `Array of t array
]
type lexeme = [
  1. | `Nil
  2. | `Integer of int64
  3. | `String of string
  4. | `Error of string
  5. | `Bs of int
  6. | `As of int
]
type error = [
  1. | `Msg of string
  2. | `Unexpected of char
  3. | `Invalid_value
  4. | `Invalid_encoder
]
val pp_error : Format.formatter -> error -> unit
val string_of_error : error -> string
val unwrap : ('a, error) result -> 'a
exception Exc of error
module type INPUT = sig ... end
module type OUTPUT = sig ... end
module type READER = sig ... end
module type WRITER = sig ... end
module type S = sig ... end
module Reader (I : INPUT) : READER with type ic = I.ic
module Writer (O : OUTPUT) : WRITER with type oc = O.oc
module Make (Reader : READER) (Writer : WRITER) : S with module Reader = Reader and module Writer = Writer
module String_reader : READER with type ic = string ref
module String_writer : WRITER with type oc = string ref
module String : S with module Reader = String_reader and module Writer = String_writer
val is_nil : t -> bool
val to_string : t -> (string, error) result
val to_string_exn : t -> string
val to_integer : t -> (int64, error) result
val to_integer_exn : t -> int64
val to_float : t -> (float, error) result
val to_float_exn : t -> float
val to_array : (t -> 'b) -> t -> ('b array, error) result
val to_array_exn : (t -> 'b) -> t -> 'b array
val of_alist : (string * t) list -> t
val to_alist : (t -> 'k) -> (t -> 'v) -> t -> (('k * 'v) list, error) result
val to_alist_exn : (t -> 'k) -> (t -> 'v) -> t -> ('k * 'v) list
OCaml

Innovation. Community. Security.