#[non_exhaustive]pub enum InvokeErrorKind {
Internal,
Timeout,
Trap,
OutputTooLarge,
InvalidOutput,
InvalidModel,
InvalidInput,
UnsupportedCapability,
ExecutionFailed,
}Expand description
Stable categorisation of invoke failures.
The four guest-reported variants (InvalidModel, InvalidInput,
UnsupportedCapability, ExecutionFailed) correspond 1:1 to the
WIT handler-error variants. They share the same stable IPC code
(handlerInternalError) for backwards compatibility with v1/v2
clients, but carry distinct fixed public messages and are
distinguishable host-side for logging and diagnostics.
Marked #[non_exhaustive] so future variants (e.g. for new WIT
handler-error entries or host-side failure modes) can be added
without breaking downstream exhaustive match arms. This preserves
the patch-level version guarantee even though the enum is part of
the crate’s public API surface.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Internal
Host-side input serialisation or size check failed.
Timeout
Fuel budget or epoch deadline was hit. Retryable.
Trap
Wasmtime trap (unreachable, OOB, stack overflow, …).
OutputTooLarge
Handler output exceeded MAX_IO_BYTES.
InvalidOutput
Handler output failed JSON deserialisation on the host side.
InvalidModel
Guest reported invalid-model via the WIT handler-error
variant. The variant detail is stored in InvokeError::detail
for host logs only.
InvalidInput
Guest reported invalid-input via the WIT handler-error
variant. The variant detail is stored in InvokeError::detail
for host logs only.
UnsupportedCapability
Guest reported unsupported-capability via the WIT
handler-error variant. The variant detail is stored in
InvokeError::detail for host logs only.
ExecutionFailed
Guest reported execution-failed via the WIT handler-error
variant. The variant detail is stored in InvokeError::detail
for host logs only.
Trait Implementations§
Source§impl Clone for InvokeErrorKind
impl Clone for InvokeErrorKind
Source§fn clone(&self) -> InvokeErrorKind
fn clone(&self) -> InvokeErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for InvokeErrorKind
Source§impl Debug for InvokeErrorKind
impl Debug for InvokeErrorKind
impl Eq for InvokeErrorKind
Source§impl PartialEq for InvokeErrorKind
impl PartialEq for InvokeErrorKind
impl StructuralPartialEq for InvokeErrorKind
Auto Trait Implementations§
impl Freeze for InvokeErrorKind
impl RefUnwindSafe for InvokeErrorKind
impl Send for InvokeErrorKind
impl Sync for InvokeErrorKind
impl Unpin for InvokeErrorKind
impl UnsafeUnpin for InvokeErrorKind
impl UnwindSafe for InvokeErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more