Imandrakit_ser_pack.DeserDeserialization
A deserializer takes a value value, and returns a value of type 'a from it.
val return : 'a -> 'a tval failf : ('a, unit, string, 'b) format4 -> 'aFail to decode with a formatted message.
val to_unit : unit tval to_int : int tval to_int64 : int64 tval to_bool : bool tval to_float : float tval to_dict : value Imandrakit_common.Str_map.t tval to_text : string tval to_bytes : string tval ptr_of_int : int -> ptrEntry point
val parse_exn : string -> stateval create_cache_key : unit -> _ cache_keyGenerate a new (generative) cache key for a type.
NOTE this should be called only at module toplevel, as a constant, not dynamically inside a function: let key: foo value_pack.Deser.cache_key = value_pack.Deser.create_cache_key ();;. Indeed, this is generative, so creating multiple keys for a type will result in sub-par or inexistant caching.
with_cache key dec is the same decoder as dec but it uses key to retrieve values directly from an internal table for entries/values that have already been decoded in the past. This means that a value that was encoded with a lot of sharing (e.g in a graph, or a large string using Ser.add_string) will be decoded only once.
fix f is a recursive deserializer. f receives a deserializer for recursive cases and must use it to implement the deserialization for the current value.
Entrypoint for the pack, as used in Ser.finalize_value or Ser.finalize_string
val show_diagnostic : state -> stringShow the content of the deserialized value using the diagnostic notation
val pp_diagnostic : Stdlib.Format.formatter -> state -> unitShow the content of the deserialized value using the diagnostic notation