pub enum CapabilityError {
UnsupportedContractVersion(String),
InvalidManifest(String),
CapabilityUnavailable(String),
Trap(String),
InvalidOutput(String),
ResourceExhausted(String),
Cancelled,
Timeout,
}Expand description
Everything ComponentValidator::validate or a real CapabilityEngine
can fail with, named so the message alone tells the caller what to fix.
Split into two phases, matching the port’s own split: validation/load-time
(UnsupportedContractVersion, InvalidManifest, CapabilityUnavailable
— rejected before a route is ever registered) and invocation-time
(Trap, InvalidOutput, ResourceExhausted, Cancelled, Timeout —
surfaced from a live CapabilityEngine::invoke call). #1 scoped this
enum down to only the first phase since no CapabilityEngine existed yet;
#3 (ADR-001’s component engine wiring) adds the second phase back.
Variants§
UnsupportedContractVersion(String)
The manifest’s contract_version is not one this host understands.
InvalidManifest(String)
The manifest or component bytes are structurally invalid.
A declared capability has no matching grant, or its scope is empty/wildcarded in a way its kind never permits, or (at engine time) a granted capability has no matching real dispatcher wired.
Trap(String)
The component trapped (panicked/aborted) during execution.
InvalidOutput(String)
The component produced output that does not match its declared export shape.
ResourceExhausted(String)
A configured memory, CPU, concurrency, or queue limit was exceeded.
Cancelled
The invocation was cancelled before it completed.
Timeout
The invocation exceeded its configured deadline.
Trait Implementations§
Source§impl Debug for CapabilityError
impl Debug for CapabilityError
Source§impl Display for CapabilityError
impl Display for CapabilityError
impl Eq for CapabilityError
Source§impl Error for CapabilityError
impl Error for CapabilityError
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()