Module Value_codec.Decoder

Parameters

module Sptr : Sptr.S
module State_tys : sig ... end

Signature

type nonrec rust_val = Sptr.t Rust_val.t
module ParserMonad : sig ... end
val variant_of_enum : offset:[< Soteria__Bv_values__Typed.T.sint ] Soteria__Bv_values__Typed.t -> Charon.Types.ty -> Charon.Types.variant_id ParserMonad.t

Parses the current variant of the enum at the given offset. This handles cases such as niches, where the discriminant isn't directly encoded as a tag.

val decode : meta: ([< Soteria__Bv_values__Typed.T.any ] Soteria__Bv_values__Typed.t, 'a) Rust_val.meta_raw -> offset:Soteria_rust_lib.Typed.T.sint Typed.t -> Charon.Types.ty -> rust_val ParserMonad.t

decode ~meta ~offset ty Parses a rust value of type ty at the given offset, using the provided metadata for DSTs, and returns the associated Rust_val. This does not perform any validity checking, aside from erroring if the type is uninhabited.