package resp

  1. Overview
  2. Docs

REdis Serialization Protocol library for OCaml

%%VERSLwtN%% — homepage

Resp

type t =
  1. | Nil
  2. | Integer of int64
  3. | Simple_string of string
  4. | Error of string
  5. | Bulk of [ `String of string | `Bytes of bytes ]
  6. | Array of t Seq.t
type lexeme = [
  1. | `Nil
  2. | `Integer of int64
  3. | `Simple_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_bytes : t -> (bytes, error) result
val to_bytes_exn : t -> bytes
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 to_list : (t -> 'b) -> t -> ('b list, error) result
val to_list_exn : (t -> 'b) -> t -> 'b list
val to_seq : (t -> 'b) -> t -> ('b Seq.t, error) result
val to_seq_exn : (t -> 'b) -> t -> 'b Seq.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
val to_hashtbl : (t -> 'k) -> (t -> 'v) -> t -> (('k, 'v) Hashtbl.t, error) result
val to_hashtbl_exn : (t -> 'k) -> (t -> 'v) -> t -> ('k, 'v) Hashtbl.t
val int : int -> t
val int64 : int64 -> t
val float : float -> t
val bytes : bytes -> t
val string : string -> t
val simple_string : string -> t
val nil : t
val array : ('a -> t) -> 'a array -> t
val list : ('a -> t) -> 'a list -> t
val alist : ('k -> t) -> ('v -> t) -> ('k * 'v) list -> t
val hashtbl : ('k -> t) -> ('v -> t) -> ('k, 'v) Hashtbl.t -> t
val id : 'a -> 'a
val equal : t -> t -> bool
OCaml

Innovation. Community. Security.