pub enum WasmDispatchError {
Incompatible {
decision: WasmAbiCompatibilityDecision,
},
Handle(WasmHandleError),
InvalidState {
state: WasmBoundaryState,
symbol: WasmAbiSymbol,
},
InvalidRequest {
reason: String,
},
}Expand description
Error returned when a dispatch call fails at the boundary level (before reaching the runtime).
Variants§
Incompatible
ABI version is not compatible.
Fields
§
decision: WasmAbiCompatibilityDecisionThe compatibility decision that rejected the call.
Handle(WasmHandleError)
Handle validation failed.
InvalidState
Boundary state does not allow this operation.
InvalidRequest
Request payload failed validation.
Implementations§
Source§impl WasmDispatchError
impl WasmDispatchError
Sourcepub fn to_failure(&self) -> WasmAbiFailure
pub fn to_failure(&self) -> WasmAbiFailure
Converts this dispatch error to a boundary failure envelope.
Sourcepub fn to_outcome(&self) -> WasmAbiOutcomeEnvelope
pub fn to_outcome(&self) -> WasmAbiOutcomeEnvelope
Wraps this error as an Err outcome envelope.
Trait Implementations§
Source§impl Clone for WasmDispatchError
impl Clone for WasmDispatchError
Source§fn clone(&self) -> WasmDispatchError
fn clone(&self) -> WasmDispatchError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WasmDispatchError
impl Debug for WasmDispatchError
Source§impl Display for WasmDispatchError
impl Display for WasmDispatchError
Source§impl Error for WasmDispatchError
impl Error for WasmDispatchError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<WasmHandleError> for WasmDispatchError
impl From<WasmHandleError> for WasmDispatchError
Source§fn from(source: WasmHandleError) -> Self
fn from(source: WasmHandleError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for WasmDispatchError
impl PartialEq for WasmDispatchError
impl Eq for WasmDispatchError
impl StructuralPartialEq for WasmDispatchError
Auto Trait Implementations§
impl Freeze for WasmDispatchError
impl RefUnwindSafe for WasmDispatchError
impl Send for WasmDispatchError
impl Sync for WasmDispatchError
impl Unpin for WasmDispatchError
impl UnsafeUnpin for WasmDispatchError
impl UnwindSafe for WasmDispatchError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).