package serde

  1. Overview
  2. Docs

Module Serde.DeSource

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