package protocell

  1. Overview
  2. Docs
type t
type sort
type id = Base.int
type serialization_error = Field_value.validation_error
type parse_error = [
  1. | `Unknown_wire_type of Base.int
  2. | `Integer_outside_int_type_range of Base.int64
  3. | `Varint_too_long
  4. | `Invalid_string_length of Base.int
  5. | Byte_input.error
]
type parsed_message
val sort_to_string : sort -> Base.string
val serialize_field : id -> 'v Field_value.typ -> 'v -> Byte_output.t -> (Base.unit, [> serialization_error ]) Base.Result.t
val serialize_optional_field : id -> 'v Field_value.typ -> 'v Base.option -> Byte_output.t -> (Base.unit, [> serialization_error ]) Base.Result.t
val serialize_repeated_field : id -> 'v Field_value.typ -> 'v Base.list -> Byte_output.t -> (Base.unit, [> serialization_error ]) Base.Result.t
val serialize_user_field : id -> ('v -> (Base.string, [> serialization_error ] as 'e) Base.Result.t) -> 'v Base.option -> Byte_output.t -> (Base.unit, 'e) Base.Result.t
val serialize_user_oneof_field : id -> ('v -> (Base.string, [> serialization_error ] as 'e) Base.Result.t) -> 'v -> Byte_output.t -> (Base.unit, 'e) Base.Result.t
val serialize_repeated_user_field : id -> ('v -> (Base.string, [> serialization_error ] as 'e) Base.Result.t) -> 'v Base.list -> Byte_output.t -> (Base.unit, 'e) Base.Result.t
val serialize_enum_field : id -> ('v -> Base.int) -> 'v -> Byte_output.t -> (Base.unit, [> serialization_error ]) Base.Result.t
val serialize_repeated_enum_field : id -> ('v -> Base.int) -> 'v Base.list -> Byte_output.t -> (Base.unit, [> serialization_error ]) Base.Result.t
val deserialize_message : Byte_input.t -> (parsed_message, [> parse_error ]) Base.Result.t
val decode_field : id -> 'v Field_value.typ -> parsed_message -> ('v, [> deserialization_error ]) Base.Result.t
val decode_optional_field : id -> 'v Field_value.typ -> parsed_message -> ('v Base.option, [> deserialization_error ]) Base.Result.t
val decode_repeated_field : id -> 'v Field_value.typ -> parsed_message -> ('v Base.list, [> deserialization_error ]) Base.Result.t
val decode_user_field : id -> (Base.string -> ('v, [> deserialization_error ] as 'e) Base.Result.t) -> parsed_message -> ('v Base.option, 'e) Base.Result.t
val decode_user_oneof_field : id -> (Base.string -> ('v, [> deserialization_error ] as 'e) Base.Result.t) -> parsed_message -> ('v, 'e) Base.Result.t
val decode_repeated_user_field : id -> (Base.string -> ('v, [> deserialization_error ] as 'e) Base.Result.t) -> parsed_message -> ('v Base.list, 'e) Base.Result.t
val decode_enum_field : id -> (Base.int -> 'v Base.option) -> (Base.unit -> 'v) -> parsed_message -> ('v, [> deserialization_error ]) Base.Result.t
val decode_repeated_enum_field : id -> (Base.int -> 'v Base.option) -> (Base.unit -> 'v) -> parsed_message -> ('v Base.list, [> deserialization_error ]) Base.Result.t
val decode_oneof_field : (id, parsed_message -> ('v, [> deserialization_error ] as 'e) Base.Result.t) Base.List.Assoc.t -> parsed_message -> ('v Base.option, 'e) Base.Result.t
OCaml

Innovation. Community. Security.