pub enum BackendWalkError {
MissingInput {
op_type: String,
input_name: String,
},
OutputArityMismatch {
op_type: String,
produced: usize,
declared: usize,
},
UnknownOpType(String),
MissingExecuteOutput {
op_type: String,
output_name: String,
},
WireMaterializeFailed {
type_hash: u64,
reason: String,
},
}Expand description
Failures the default walker surfaces when handed a malformed
GraphProto body or when a Backend::execute impl violates
its output-name contract. Required From bound on
Backend::Error makes the walker fail with a typed error
instead of panic!-ing on peer-supplied or buggy input.
Variants§
MissingInput
A NodeProto references an input value not in the running
environment. The graph either uses a value the caller didn’t
bind OR an upstream node failed to populate one of its
declared outputs.
Fields
OutputArityMismatch
A per-op method produced a different number of outputs than
the consuming NodeProto declares. Indicates a compiler
or graph-builder bug.
Fields
UnknownOpType(String)
op_type is not one of bb_ir::tensor_primitives::TENSOR_PRIMITIVES_OPS.
Backends that use the default per-op walker must keep graphs
to primitives only. The wire path can hit this when an
adversarial peer ships a BackendSubgraph_* carrier whose
body references an extension op.
MissingExecuteOutput
A Backend::execute impl returned successfully but did not
populate the declared output output_name in the result
map. Indicates a Backend impl bug — execute MUST honor
the graph’s output names.
Fields
WireMaterializeFailed
Default crate::contracts::Backend::materialize_from_wire
failed before reaching the backend: no registered decoder,
the decoder rejected the bytes, or the decoded carrier was
not assignable to Self::Tensor. Backends overriding
materialize_from_wire never surface this — they emit their
own typed error.
Trait Implementations§
Source§impl Clone for BackendWalkError
impl Clone for BackendWalkError
Source§fn clone(&self) -> BackendWalkError
fn clone(&self) -> BackendWalkError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackendWalkError
impl Debug for BackendWalkError
Source§impl Display for BackendWalkError
impl Display for BackendWalkError
impl Eq for BackendWalkError
Source§impl Error for BackendWalkError
impl Error for BackendWalkError
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()
Source§impl PartialEq for BackendWalkError
impl PartialEq for BackendWalkError
Source§fn eq(&self, other: &BackendWalkError) -> bool
fn eq(&self, other: &BackendWalkError) -> bool
self and other values to be equal, and is used by ==.