12345678910111213141516171819202122232425262728293031323334353637383940414243444546(** Many RESP3 replies to Redis commands are composed of bulk strings. There are a limited
number of common patterns that are used by many commands.
Provide a set of common parsers for a bulk string type that can be used to handle bulk
command responses efficiently.
*)openCoremoduletypeS=sigtypet(** Always a single bulk string. Example: ECHO *)valsingle:([>read],Iobuf.seek)Iobuf.t->tOr_error.t(** A optional single bulk string. Example: GET *)valsingle_opt:([>read],Iobuf.seek)Iobuf.t->toptionOr_error.t(** A list of optional single bulk strings. Example: MGET *)vallist_opt:([>read],Iobuf.seek)Iobuf.t->toptionlistOr_error.t(** A list of single bulk strings. Example: KEYS *)vallist:([>read],Iobuf.seek)Iobuf.t->tlistOr_error.t(** A set of single bulk strings. Represented as a list for simplicity, and to avoid
requiring all value implementations implement Comparable. Example: SMEMBERS. *)valset:([>read],Iobuf.seek)Iobuf.t->tlistOr_error.t(** An int followed by a list. Example: SCAN *)valint_and_list:([>read],Iobuf.seek)Iobuf.t->(int*tlist)Or_error.tend(** The term "map" here refers to a map node in the RESP3 protocol, which is represented
as an associative list. *)moduletypeS_map=sigtypekeytypevalue(** field/value pairs. Example: HGETALL *)valmap:([>read],Iobuf.seek)Iobuf.t->(key*value)listOr_error.t(** An int followed by field/value pairs. Example: HSCAN *)valint_and_alternating_key_value:([>read],Iobuf.seek)Iobuf.t->(int*(key*value)list)Or_error.tend