Skip to main content

Module effects

Module effects 

Source
Expand description

Record native outcomes before exposing them to guest code.

Argument conversion (including guest callbacks) runs before execute; result conversion runs afterwards. The history port owns ordering and persistence. An absent history keeps ordinary execution direct. No Wasm handles are encoded.

Structs§

EffectCall
A call’s identity is allocated by the history implementation, not the interpreter.
HistoryError
OutcomeBytes
Encoded bytes use MessagePack’s binary representation, never an integer array.

Enums§

NativeError
Guest-visible error data, captured before the host wrapper raises an exception.

Constants§

CODEC_VERSION
MAX_OUTCOME_BYTES
Independent of the filesystem journal’s much smaller metadata limit.

Traits§

EffectHistory
Implementations must serialize calls and commit before complete returns. A missing outcome is an instruction to execute, regardless of idempotency.

Functions§

execute
Execute one native action, or return its committed native outcome.
stored_heap_bound
Validate a stored MessagePack envelope before Serde sees allocation hints. The caller must bound the blob size before validating the encoded structure. element_bytes is the largest sequence element in the persistence schema.

Type Aliases§

RecordedOutcome