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

Innovation. Community. Security.