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 ==.impl StructuralPartialEq for BackendWalkError
Auto Trait Implementations§
impl Freeze for BackendWalkError
impl RefUnwindSafe for BackendWalkError
impl Send for BackendWalkError
impl Sync for BackendWalkError
impl Unpin for BackendWalkError
impl UnsafeUnpin for BackendWalkError
impl UnwindSafe for BackendWalkError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedComponent for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request