pub enum DispatchError {
UnknownOperation(String),
InvalidArguments(ValidationError),
Decode(CodecError),
Host(HostError),
Panic,
Encode(CodecError),
InvalidResult(ValidationError),
}Expand description
A failure produced by macro-generated typed operation dispatch.
Variants§
UnknownOperation(String)
The requested operation is not declared by this interface.
InvalidArguments(ValidationError)
Protocol validation rejected the named arguments.
Decode(CodecError)
A validated value could not be decoded to its Rust type.
Host(HostError)
The implementation reported a host/runtime failure.
Panic
The implementation panicked after invocation began.
Panic payloads are deliberately discarded because they can contain backend-private diagnostics.
Encode(CodecError)
The Rust result could not be encoded.
InvalidResult(ValidationError)
The encoded result did not match the generated declaration.
Implementations§
Source§impl DispatchError
impl DispatchError
Sourcepub fn phase(&self) -> DispatchPhase
pub fn phase(&self) -> DispatchPhase
Returns the execution phase in which this dispatch failure occurred.
Sourcepub fn effect_guarantee(&self) -> Option<EffectGuarantee>
pub fn effect_guarantee(&self) -> Option<EffectGuarantee>
Returns a post-invocation effect guarantee when the implementation supplied one.
Panic, encode, and result-validation failures default to Unknown until
a provider confirms rollback. Pre-invocation failures return None.
Trait Implementations§
Source§impl Debug for DispatchError
impl Debug for DispatchError
Source§impl Display for DispatchError
impl Display for DispatchError
Source§impl Error for DispatchError
impl Error for DispatchError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()