Expand description
Deserialize a typed T: Deserialize directly from an in-memory
RuntimeValue tree — no CBOR/JSON round-trip.
The IR embeds nested fragments (a circuit Expression, a
TypeDescriptor, a lambda Statement) as dynamically-typed
RuntimeValue subtrees inside vm-op ref/type slots and lambda
bodies. Recovering the typed form previously re-serialized the
subtree to a CBOR buffer and parsed it back (ciborium round-trip)
purely to cross the type boundary while preserving byte-strings.
from_runtime_value does it in place: it drives the target’s
Deserialize straight off the RuntimeValue enum. Bytes maps to
visit_bytes (the byte-string fidelity the JSON bridge can’t keep),
Int(i128) to visit_i128, objects/arrays to map/seq access —
self-describing, so serde’s internally-tagged enums (tag = "expr",
"type-name", "stmt", …) resolve through deserialize_any.
Structs§
- From
Value Error - Error from deserializing a typed value out of a
RuntimeValue.
Functions§
- from_
runtime_ value - Deserialize
Tdirectly from a borrowedRuntimeValue— the in-place replacement for aciborium/serde_jsonround-trip.