pub enum DataError {
InvalidIdentifier {
value: String,
reason: &'static str,
},
Validation(String),
FingerprintMismatch {
kind: &'static str,
expected: String,
actual: String,
},
UnknownHandle {
kind: &'static str,
handle: u64,
},
RelationBoundaryViolation {
kind: &'static str,
detail: String,
},
IncompatibleReducer {
reducer: &'static str,
task: &'static str,
},
SignalTypeMismatch {
expected: &'static str,
actual: &'static str,
},
Serialization(Error),
}Variants§
InvalidIdentifier
Validation(String)
FingerprintMismatch
A recomputed or declared fingerprint did not match the expected value
(schema, plan, relation or params) — a replay/compatibility
failure that a host can route differently from a plain validation error.
UnknownHandle
A data or view handle was released or never issued; the caller is using a stale or unknown handle against the coordinator arena.
RelationBoundaryViolation
A supplied fold set leaks a repetition group or augmentation origin across the train/validation boundary (the ADR-05 safety invariant).
IncompatibleReducer
An aggregation reducer is incompatible with the prediction task it was
applied to (for example vote on a regression task) — ADR-07.
SignalTypeMismatch
A provider-declared signal type does not match the one the plan or bundle expects (for example an absorbance-trained pipeline applied to raw reflectance) — ADR-06.
Serialization(Error)
Implementations§
Source§impl DataError
impl DataError
Sourcepub fn remediation_hint(&self) -> &'static str
pub fn remediation_hint(&self) -> &'static str
Return the remediation hint associated with this error.
Sourcepub fn context(&self) -> BTreeMap<String, Value>
pub fn context(&self) -> BTreeMap<String, Value>
Return structured context fields for logs, bindings and tests.
Sourcepub fn descriptor(&self) -> DataErrorDescriptor
pub fn descriptor(&self) -> DataErrorDescriptor
Build the serializable ADR-11 descriptor for this error.
Sourcepub fn descriptor_json(&self) -> Result<String, Error>
pub fn descriptor_json(&self) -> Result<String, Error>
Serialize the ADR-11 descriptor as compact JSON.
Sourcepub fn error_code(&self) -> u32
pub fn error_code(&self) -> u32
Stable ADR-11 numeric error code for FFI consumers: the high 16 bits are
the taxonomy category id and the low 16 bits are the per-category code id,
mirroring the (category << 16) | code convention from ADR-11. The
category ids are shared with dag-ml so a given category maps to the same
number in both libraries.
Trait Implementations§
Source§impl Error for DataError
impl Error for DataError
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()