Skip to main content

decode_input

Function decode_input 

Source
pub fn decode_input(value: Ts<CarapaceInputV1>) -> Result<WasmSession, JsValue>
Expand description

Decodes a CarapaceInputV1-shaped JS value (see input_v1’s table doc comments for the exact field names — #[serde(rename_all = "camelCase")] throughout) into a steppable WasmSession. Rejects with a { kind: "...", ... }-shaped JS error object on any input_v1::DecodeError, the same tagged shape a Rust caller would match on.