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,
},
MalformedFrame(String),
StreamAborted,
}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.
MalformedFrame(String)
A streaming backend produced bytes that did not decode as a valid
fidius_core::frame::Frame (bad tag, truncated, malformed payload).
Distinct from CallError::Deserialization, which is about an item’s
contents; this is about the framing around items. (FIDIUS-I-0026.)
StreamAborted
A stream ended without a terminal END/ERROR frame — the producer
went away mid-stream (e.g. a dropped backend task, a crashed
interpreter, a closed channel). (FIDIUS-I-0026.)
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()