polywrap_wasm.types.state module

This module contains the State type for holding the state of a Wasm wrapper.

class polywrap_wasm.types.state.State(*, invoke_options: WasmInvokeOptions, invoke_result: InvokeResult[str] | None = None, subinvoke_result: InvokeResult[Exception] | None = None, get_implementations_result: bytes | None = None)[source]

Bases: object

State is a dataclass that holds the state of a Wasm wrapper.

Parameters:
  • invoke_options (WasmInvokeOptions) – The options used for the invocation.

  • invoke_result (Optional[InvokeResult[str]]) – The result of an invocation.

  • subinvoke_result (Optional[InvokeResult[Exception]]) – The result of a subinvocation.

  • get_implementations_result (Optional[bytes]) – The result of a get implementations call.

get_implementations_result: bytes | None
invoke_options: WasmInvokeOptions
invoke_result: InvokeResult[str] | None
subinvoke_result: InvokeResult[Exception] | None