package ocaml-protoc-plugin

  1. Overview
  2. Docs

Module for deserializing values

module S : sig ... end
module C = S.C
type 'a sentinal = unit -> 'a Result.t
type 'a decoder = Protobuf__.Field.t -> 'a Result.t
type (_, _) sentinal_list =
  1. | SNil : ('a, 'a) sentinal_list
  2. | SCons : 'a sentinal * ('b, 'c) sentinal_list -> ('a -> 'b, 'c) sentinal_list
val error_wrong_field : string -> Protobuf__.Field.t -> 'a Result.t
val error_illegal_value : string -> Protobuf__.Field.t -> 'a Result.t
val error_required_field_missing : 'a Result.t
val read_varint : signed:bool -> type_name:string -> Protobuf__.Field.t -> Int64.t Result.t
val read_varint32 : signed:bool -> type_name:string -> Protobuf__.Field.t -> (int32, Result.error) result
val type_of_spec : 'a. 'a S.spec -> [> `Fixed_32_bit | `Fixed_64_bit | `Length_delimited | `Varint ] * 'a decoder
val default_of_field_type : [< `Fixed_32_bit | `Fixed_64_bit | `Length_delimited | `Varint ] -> Protobuf__.Field.t
val sentinal : 'a. 'a S.compound -> (int * unit decoder) list * 'a sentinal
module Map : sig ... end
val read_fields_map : (Map.key * (Protobuf__.Field.t -> (unit, Result.error) result)) list -> Reader.t -> (unit, Result.error) result

Read fields - map based for nlogn lookup

val read_fields_array : int -> (int * (Protobuf__.Field.t -> (unit, Result.error) result)) list -> Reader.t -> (unit, Result.error) result

Read fields - array based for O(1) lookup

val deserialize : 'constr 't. ('constr, 't) S.compound_list -> 'constr -> Reader.t -> 't Result.t
OCaml

Innovation. Community. Security.