aion/awl/codec
Fixed codec glue hoisted out of every generated AWL module (AWL-BC-0,
hoist-only): the builtin leaf codecs (String/Int/Float/Bool/Nil),
the raw wire-passthrough codec heterogeneous parallel branches ride, the
per-branch decode helper, and the encode-only child-input codec.
Generated per-type record/enum/union codecs stay in the emitted module and
reference these leaves qualified (awlc.string_to_json, …); the behavior is
byte-identical to the code the emitter used to inline.
Values
pub fn decoded(
item_codec: codec.Codec(a),
payload: String,
action: String,
) -> Result(a, error.AwlError)
Decode one parallel branch’s payload with its action’s return codec; a decode failure becomes a step failure naming the action.
pub fn json_value() -> codec.Codec(json.Json)
Encode-only codec for child workflow inputs: the parent assembles the child’s input record as JSON and never decodes it back.
pub fn nil_codec() -> codec.Codec(Nil)
Nil codec: encodes {} and decodes accepting any value.
pub fn raw() -> codec.Codec(String)
Identity codec: heterogeneous parallel branches ride workflow.all as raw
JSON payload strings, decoded per branch at the join with [decoded].