package bson2

  1. Overview
  2. Docs

Module Binary.Reader

exception No_data of string
type bson_type =
  1. | Double of float
  2. | String of string
  3. | Document_start
  4. | Array_start
  5. | Binary of Bson2__.S.binary_type * bytes
  6. | ObjectId of bytes
  7. | Boolean of bool
  8. | DateTime of int64
  9. | Null
  10. | Regex of {
    1. pattern : string;
    2. options : string;
    }
  11. | JSCode of string
  12. | JSCode_with_scope of string
  13. | Int32 of int32
  14. | Timestamp of int64
  15. | Int64 of int64
  16. | Decimal128 of bytes
  17. | Min_key
  18. | Max_key
val sexp_of_bson_type : bson_type -> Ppx_sexp_conv_lib.Sexp.t
val bson_type_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> bson_type
type read_result =
  1. | Field of string * bson_type
  2. | End_of_document
val sexp_of_read_result : read_result -> Ppx_sexp_conv_lib.Sexp.t
val read_result_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> read_result
type t
val of_bytes : bytes -> t
val of_string : string -> t
val of_in_channel : Core.In_channel.t -> t
val read_next : t -> read_result
OCaml

Innovation. Community. Security.