pub enum HostError {
VersionMismatch {
host: String,
provider: String,
provider_version: String,
},
Wire(String),
Transport {
id: String,
message: String,
},
ProviderCrashed {
id: String,
},
Timeout {
id: String,
timeout_ms: u64,
},
Provider {
id: String,
message: String,
},
ConsentRequired {
id: String,
data_flow: DataFlow,
},
UnexpectedEnvelope {
id: String,
expected: String,
got: String,
},
UnknownProvider(String),
Spawn(String),
}Expand description
Anything the host runtime can surface while talking to a provider.
Variants§
VersionMismatch
The provider speaks an incompatible protocol family
(06-context-protocol.md §3). Reported the instant the handshake ack
arrives — never a hang (task deliverable 1).
Wire(String)
A line/body could not be encoded to or decoded from the wire envelope
(06-context-protocol.md §3.1). A malformed provider message is a
clean error, never a host crash (task deliverable 5).
Transport
The underlying transport (stdio pipe or HTTP) failed.
ProviderCrashed
The provider’s child process closed its stream mid-exchange — it
crashed. Isolated to this provider; never poisons a query_all
(task deliverable 5).
Timeout
The provider took longer than the host’s per-provider budget.
Provider
The provider reported an error over the wire (an error envelope).
ConsentRequired
The provider declares egress and has no recorded consent, so the
host refuses to transmit a query to it (06-context-protocol.md
§3.5 — a host MUST NOT auto-enable egress providers). The query
payload never left the host.
UnexpectedEnvelope
A message of the wrong kind arrived where the protocol expected a
specific envelope (e.g. a frames reply to a query).
UnknownProvider(String)
No provider is registered under the given id.
Spawn(String)
Spawning the provider child process failed.
Trait Implementations§
Source§impl Error for HostError
impl Error for HostError
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()