Module Bin_ser.Decoder_state

type t = decoder_state

Decoder state

val get : t -> (_'a) Key.t -> int -> 'a option

Access a decoded value of type 'a with the given integer.

val get_exn : t -> (_'a) Key.t -> int -> 'a

Access a decoded value of type 'a with the given integer.

raises Not_found

if no such object was decoded

val set_key_state : t -> ('st_) Key.t -> 'st -> unit

Set the state for the given key

val make : ?⁠db:Event.DB.t -> unit -> t

make ~defs () creates a decoder with side definitions defs

val add_side_defs : t -> M.t iter -> unit

Adds the given set of side messages to the decoder

val of_int_exn : t -> int -> Uid.t
raises Not_found
val set_ : t -> int -> Uid.t -> unit