package serde

  1. Overview
  2. Docs
include module type of struct include De_base end
type ('value, 'state) t = 'state De_base.ctx -> ('value, error) Stdlib.result
and 'state ctx = 'state De_base.deserializer * 'state
type ('value, 'state, 'tag) visitor = ('value, 'state, 'tag) De_base.visitor = {
  1. visit_int : 'state De_base.ctx -> int -> ('value, error) Stdlib.result;
  2. visit_string : 'state De_base.ctx -> string -> ('value, error) Stdlib.result;
}
val deserializer : ('state De_base.ctx -> ('value, error) Stdlib.result) -> ('value, 'state) t
module type Deserializer = De_base.Deserializer
type 'state deserializer = (module Deserializer with type state = 'state)
val deserialize : 'a -> ('a -> 'b) -> 'b
val deserialize_int8 : 'state ctx -> (char, error) Stdlib.result
val deserialize_int16 : 'state ctx -> (int, error) Stdlib.result
val deserialize_int31 : 'state ctx -> (int, error) Stdlib.result
val deserialize_int32 : 'state ctx -> (int32, error) Stdlib.result
val deserialize_int64 : 'state ctx -> (int64, error) Stdlib.result
val deserialize_bool : 'state ctx -> (bool, error) Stdlib.result
val deserialize_float : 'state ctx -> (float, error) Stdlib.result
val deserialize_record : 'state ctx -> string -> int -> ('a, 'state) De_base.t -> ('a, error) Stdlib.result
val deserialize_field : 'state ctx -> string -> ('a, 'state) De_base.t -> ('a, error) Stdlib.result
val deserialize_sequence : 'state ctx -> int -> (size:int -> ('a, 'state) De_base.t) -> ('a, error) Stdlib.result
val deserialize_element : 'state ctx -> ('a, 'state) De_base.t -> ('a option, error) Stdlib.result
val deserialize_variant : 'state ctx -> de:('state De_base.ctx -> ('a, error) Stdlib.result) -> name:string -> variants:string list -> ('a, error) Stdlib.result
val deserialize_unit_variant : 'state ctx -> (unit, error) Stdlib.result
val deserialize_newtype_variant : 'state ctx -> ('a, 'state) De_base.t -> ('a, error) Stdlib.result
val deserialize_tuple_variant : 'state ctx -> int -> (size:int -> ('a, 'state) De_base.t) -> ('a, error) Stdlib.result
val deserialize_record_variant : 'state ctx -> int -> (size:int -> ('a, 'state) De_base.t) -> ('a, error) Stdlib.result
val deserialize_key : 'state ctx -> ('a, 'state, 'b) De_base.visitor -> ('a option, error) Stdlib.result
val deserialize_identifier : 'state ctx -> ('a, 'state, 'b) De_base.visitor -> ('a, error) Stdlib.result
val deserialize_string : 'state ctx -> (string, error) Stdlib.result
val deserialize_option : 'state ctx -> ('a, 'state) De_base.t -> ('a option, error) Stdlib.result
val deserialize_ignored_any : 'state ctx -> (unit, error) Stdlib.result
val record : 'a ctx -> string -> int -> ('b, 'a) De_base.t -> ('b, error) Stdlib.result
val variant : 'a ctx -> string -> string list -> ('a De_base.ctx -> ('b, error) Stdlib.result) -> ('b, error) Stdlib.result
val sequence : 'a ctx -> (size:int -> ('b, 'a) De_base.t) -> ('b, error) Stdlib.result
val bool : 'a ctx -> (bool, error) Stdlib.result
val int : 'a ctx -> (int, error) Stdlib.result
val int8 : 'a ctx -> (char, error) Stdlib.result
val int16 : 'a ctx -> (int, error) Stdlib.result
val int32 : 'a ctx -> (int32, error) Stdlib.result
val int64 : 'a ctx -> (int64, error) Stdlib.result
val string : 'a ctx -> (string, error) Stdlib.result
val identifier : 'a ctx -> ('b, 'a, 'c) De_base.visitor -> ('b, error) Stdlib.result
val unit_variant : 'a ctx -> (unit, error) Stdlib.result
val newtype_variant : 'a ctx -> ('b, 'a) De_base.t -> ('b, error) Stdlib.result
val tuple_variant : 'a ctx -> int -> (size:int -> ('b, 'a) De_base.t) -> ('b, error) Stdlib.result
val record_variant : 'a ctx -> int -> (size:int -> ('b, 'a) De_base.t) -> ('b, error) Stdlib.result
val element : 'a ctx -> ('b, 'a) De_base.t -> ('b option, error) Stdlib.result
val field : 'a ctx -> string -> ('b, 'a) De_base.t -> ('b, error) Stdlib.result
val next_field : 'a ctx -> ('b, 'a, 'c) De_base.visitor -> ('b option, error) Stdlib.result
val option : ('a, 'b) De_base.t -> 'b ctx -> ('a option, error) Stdlib.result
val float : 'a ctx -> (float, error) Stdlib.result
val list : ('a, 'b) De_base.t -> 'b ctx -> ('a list, error) Stdlib.result
val array : ('a, 'b) De_base.t -> 'b ctx -> ('a array, error) Stdlib.result
val ignore_any : 'a ctx -> (unit, error) Stdlib.result
val d : (('state De_base.deserializer * 'state) -> 'a) -> 'state ctx -> 'a
OCaml

Innovation. Community. Security.