package ocaml-protoc-plugin
Plugin for protoc protobuf compiler to generate ocaml definitions from a .proto file
Install
Dune Dependency
Authors
Maintainers
Sources
1.0.0.tar.gz
md5=278461dfca05f428e54abddfdf229471
sha512=b54528f0079c3d38d746ba97e48530bc87edfa684bc814623c450ee65502c6d16b9ae304c6ea6e19ff0ca84c454601a367abd35b295abf5b727bc702ff792716
doc/src/ocaml-protoc-plugin.protobuf/spec.ml.html
Source file spec.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
module type T = sig type ('a, 'b) dir end type ('a, 'b) deserialize = 'a type ('a, 'b) serialize = 'b module Make(T : T) = struct type 'a proto_type = Proto3 | Proto2 of 'a option | Required type packed = Packed | Not_packed type _ spec = | Double : float spec | Float : float spec | Int32 : Int32.t spec | UInt32 : Int32.t spec | SInt32 : Int32.t spec | Fixed32 : Int32.t spec | SFixed32 : Int32.t spec | Int32_int : int spec | UInt32_int : int spec | SInt32_int : int spec | Fixed32_int : int spec | SFixed32_int : int spec | UInt64 : Int64.t spec | Int64 : Int64.t spec | SInt64 : Int64.t spec | Fixed64 : Int64.t spec | SFixed64 : Int64.t spec | UInt64_int : int spec | Int64_int : int spec | SInt64_int : int spec | Fixed64_int : int spec | SFixed64_int : int spec | Bool : bool spec | String : string spec | Bytes : bytes spec | Enum : (int -> 'a Result.t, 'a -> int) T.dir -> 'a spec | Message : (Reader.t -> 'a Result.t, 'a -> Writer.t) T.dir -> 'a spec type _ oneof = | Oneof_elem : int * 'b spec * (('b -> 'a), 'b) T.dir -> 'a oneof type ('a, 'b) oneof_value = 'a -> 'b type _ compound = | Basic : int * 'a spec * 'a proto_type -> 'a compound | Basic_opt : int * 'a spec -> 'a option compound | Repeated : int * 'a spec * packed -> 'a list compound | Oneof : ('a oneof list, 'a -> unit oneof) T.dir -> 'a compound type (_, _) compound_list = | Nil : ('a, 'a) compound_list | Cons : ('a compound) * ('b, 'c) compound_list -> ('a -> 'b, 'c) compound_list module C = struct let double = Double let float = Float let int32 = Int32 let int64 = Int64 let uint32 = UInt32 let uint64 = UInt64 let sint32 = SInt32 let sint64 = SInt64 let fixed32 = Fixed32 let fixed64 = Fixed64 let sfixed32 = SFixed32 let sfixed64 = SFixed64 let int32_int = Int32_int let int64_int = Int64_int let uint32_int = UInt32_int let uint64_int = UInt64_int let sint32_int = SInt32_int let sint64_int = SInt64_int let fixed32_int = Fixed32_int let fixed64_int = Fixed64_int let sfixed32_int = SFixed32_int let sfixed64_int = SFixed64_int let bool = Bool let string = String let bytes = Bytes let enum f = Enum f let message f = Message f let some v = Some v let none = None let proto2 v = Proto2 v let proto2_bytes v = Proto2 (Some (Bytes.of_string v)) let proto3 = Proto3 let required = Required let repeated (i, s, p) = Repeated (i, s, p) let basic (i, s, d) = Basic (i, s, d) let basic_opt (i, s) = Basic_opt (i, s) let oneof s = Oneof s let oneof_elem (a, b, c) = Oneof_elem (a, b, c) let packed = Packed let not_packed = Not_packed let ( ^:: ) a b = Cons (a, b) let nil = Nil end end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>