package serde

  1. Overview
  2. Docs
include module type of struct include Error end
type 'err de_error = [> `Duplicate_field of string | `Invalid_field_index of int | `Invalid_variant_index of int | `Message of string | `Missing_field of string | `Unexpected_exception of exn | `Missing_field of string | `Unimplemented of string | `Unknown_field of string | `Unknown_variant of string ] as 'err
val invalid_field_index : idx:'a -> ('b, [> `Invalid_field_index of 'a ]) Stdlib.result
val invalid_variant_index : idx:'a -> ('b, [> `Invalid_variant_index of 'a ]) Stdlib.result
val message : 'a -> ('b, [> `Message of 'a ]) Stdlib.result
val unexpected_exception : 'a -> ('b, [> `Unexpected_exception of 'a ]) Stdlib.result
val unimplemented : 'a -> ('b, [> `Unimplemented of 'a ]) Stdlib.result
val unknown_field : 'a -> ('b, [> `Unknown_field of 'a ]) Stdlib.result
val unknown_variant : 'a -> ('b, [> `Unknown_variant of 'a ]) Stdlib.result
val missing_field : 'a -> ('b, [> `Missing_field of 'a ]) Stdlib.result
module Deserializer : sig ... end
module Error : sig ... end
module Impls : sig ... end
module Reader : sig ... end
module Unimplemented : sig ... end
module Visitor : sig ... end
module Sequence_access : sig ... end

Access modules

module Variant_access : sig ... end
module Map_access : sig ... end
module type Base = sig ... end
module type Deserializer = sig ... end
module type Factory = sig ... end
module Make (B : Base) : Factory with type state = B.state

boilerplace below is because we don't have modular implicits yet.

it threads the two modules manually, and makes sure the all the types are escaping correctly.

val deserialize_unit : 'value 'state. 'state Deserializer.t -> 'value Visitor.t -> ('value, [> `Duplicate_field of string | `Invalid_field_index of int | `Invalid_variant_index of int | `Message of string | `Missing_field of string | `Unexpected_exception of exn | `Unimplemented of string | `Unknown_field of string | `Unknown_variant of string ] de_error) Stdlib.result
val deserialize_string : 'value 'state. 'state Deserializer.t -> 'value Visitor.t -> ('value, [> `Duplicate_field of string | `Invalid_field_index of int | `Invalid_variant_index of int | `Message of string | `Missing_field of string | `Unexpected_exception of exn | `Unimplemented of string | `Unknown_field of string | `Unknown_variant of string ] de_error) Stdlib.result
val deserialize_int : 'value 'state. 'state Deserializer.t -> 'value Visitor.t -> ('value, [> `Duplicate_field of string | `Invalid_field_index of int | `Invalid_variant_index of int | `Message of string | `Missing_field of string | `Unexpected_exception of exn | `Unimplemented of string | `Unknown_field of string | `Unknown_variant of string ] de_error) Stdlib.result
val deserialize_bool : 'value 'state. 'state Deserializer.t -> 'value Visitor.t -> ('value, [> `Duplicate_field of string | `Invalid_field_index of int | `Invalid_variant_index of int | `Message of string | `Missing_field of string | `Unexpected_exception of exn | `Unimplemented of string | `Unknown_field of string | `Unknown_variant of string ] de_error) Stdlib.result
val deserialize_identifier : 'value 'state. 'state Deserializer.t -> 'value Visitor.t -> ('value, [> `Duplicate_field of string | `Invalid_field_index of int | `Invalid_variant_index of int | `Message of string | `Missing_field of string | `Unexpected_exception of exn | `Unimplemented of string | `Unknown_field of string | `Unknown_variant of string ] de_error) Stdlib.result
val deserialize_record : 'value 'field 'state. 'state Deserializer.t -> ('value, 'field) Visitor.with_tag -> 'field Visitor.t -> name:string -> fields:string list -> ('value, [> `Duplicate_field of string | `Invalid_field_index of int | `Invalid_variant_index of int | `Message of string | `Missing_field of string | `Unexpected_exception of exn | `Unimplemented of string | `Unknown_field of string | `Unknown_variant of string ] de_error) Stdlib.result
val deserialize_seq : 'value 'state. 'state Deserializer.t -> 'value Visitor.t -> ('value, [> `Duplicate_field of string | `Invalid_field_index of int | `Invalid_variant_index of int | `Message of string | `Missing_field of string | `Unexpected_exception of exn | `Unimplemented of string | `Unknown_field of string | `Unknown_variant of string ] de_error) Stdlib.result
val deserialize_variant : 'value 'tag 'state. 'state Deserializer.t -> ('value, 'tag) Visitor.with_tag -> 'tag Visitor.t -> name:string -> variants:string list -> ('value, [> `Duplicate_field of string | `Invalid_field_index of int | `Invalid_variant_index of int | `Message of string | `Missing_field of string | `Unexpected_exception of exn | `Unimplemented of string | `Unknown_field of string | `Unknown_variant of string ] de_error) Stdlib.result
OCaml

Innovation. Community. Security.