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 bool_codec() -> codec.Codec(Bool)

Bool codec.

pub fn bool_decoder() -> decode.Decoder(Bool)

Bool decoder.

pub fn bool_to_json(value: Bool) -> json.Json

Bool JSON encoder.

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 float_codec() -> codec.Codec(Float)

Float codec.

pub fn float_decoder() -> decode.Decoder(Float)

Float decoder.

pub fn float_to_json(value: Float) -> json.Json

Float JSON encoder.

pub fn int_codec() -> codec.Codec(Int)

Int codec.

pub fn int_decoder() -> decode.Decoder(Int)

Int decoder.

pub fn int_to_json(value: Int) -> json.Json

Int JSON encoder.

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 nil_decoder() -> decode.Decoder(Nil)

Nil decoder: succeeds on any value.

pub fn nil_to_json(arg: Nil) -> json.Json

Nil JSON encoder: the empty object.

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].

pub fn string_codec() -> codec.Codec(String)

String codec.

pub fn string_decoder() -> decode.Decoder(String)

String decoder.

pub fn string_to_json(value: String) -> json.Json

String JSON encoder.

Search Document