pub enum CallError {
Serialization(String),
Deserialization(String),
Plugin(PluginError),
Panic(String),
BufferTooSmall,
NotImplemented {
bit: u32,
},
InvalidMethodIndex {
index: usize,
count: u32,
},
UnknownStatus {
code: i32,
},
WireModeMismatch {
method: String,
declared: bool,
attempted: bool,
},
Backend {
runtime: String,
message: String,
},
}Expand description
Errors that can occur when calling a plugin method.
Variants§
Serialization(String)
Deserialization(String)
Plugin(PluginError)
Panic(String)
BufferTooSmall
NotImplemented
Optional method is not implemented by this plugin — its capability bit is unset.
Returned when a method marked #[optional] is called on a plugin that chose not
to implement it. Not returned for out-of-range method indices; see InvalidMethodIndex.
InvalidMethodIndex
UnknownStatus
WireModeMismatch
A method was dispatched through the wrong wire path — a #[wire(raw)]
method called via the typed path, or vice versa. Backend-agnostic: the
Python and (future) WASM executors both enforce the raw/typed split.
Backend
A runtime-level fault originating inside an execution backend that is
not a plugin-raised PluginError — e.g. a future WASM trap
(unreachable, out-of-bounds) or an interpreter-level failure. Carries
the backend’s runtime name and a message. Plugin-raised errors (Python
exceptions included) stay in CallError::Plugin so their structured
code/message/details (including tracebacks) round-trip.
Trait Implementations§
Source§impl Error for CallError
impl Error for CallError
1.30.0 · 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()