Skip to main content

DataError

Enum DataError 

Source
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

Fields

§value: String
§reason: &'static str
§

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.

Fields

§kind: &'static str
§expected: String
§actual: String
§

UnknownHandle

A data or view handle was released or never issued; the caller is using a stale or unknown handle against the coordinator arena.

Fields

§kind: &'static str
§handle: u64
§

RelationBoundaryViolation

A supplied fold set leaks a repetition group or augmentation origin across the train/validation boundary (the ADR-05 safety invariant).

Fields

§kind: &'static str
§detail: String
§

IncompatibleReducer

An aggregation reducer is incompatible with the prediction task it was applied to (for example vote on a regression task) — ADR-07.

Fields

§reducer: &'static str
§task: &'static str
§

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.

Fields

§expected: &'static str
§actual: &'static str
§

Serialization(Error)

Implementations§

Source§

impl DataError

Source

pub fn category(&self) -> &'static str

Return the stable ADR-11 category for this error.

Source

pub fn code(&self) -> &'static str

Return the stable ADR-11 code for this error.

Source

pub fn severity(&self) -> &'static str

Return the ADR-11 severity for this error.

Source

pub fn remediation_hint(&self) -> &'static str

Return the remediation hint associated with this error.

Source

pub fn context(&self) -> BTreeMap<String, Value>

Return structured context fields for logs, bindings and tests.

Source

pub fn descriptor(&self) -> DataErrorDescriptor

Build the serializable ADR-11 descriptor for this error.

Source

pub fn descriptor_json(&self) -> Result<String, Error>

Serialize the ADR-11 descriptor as compact JSON.

Source

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 Debug for DataError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DataError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for DataError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for DataError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.