pub enum DagMlError {
InvalidIdentifier {
value: String,
reason: &'static str,
},
GraphValidation(String),
ControllerValidation(String),
CampaignValidation(String),
Planning(String),
RuntimeValidation(String),
OofValidation(String),
OofLeakage(Box<OofLeakageReport>),
Serialization(Error),
}Variants§
InvalidIdentifier
GraphValidation(String)
ControllerValidation(String)
CampaignValidation(String)
Planning(String)
RuntimeValidation(String)
OofValidation(String)
OofLeakage(Box<OofLeakageReport>)
Serialization(Error)
Implementations§
Source§impl DagMlError
impl DagMlError
Sourcepub fn remediation_hint(&self) -> String
pub fn remediation_hint(&self) -> String
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) -> DagMlErrorDescriptor
pub fn descriptor(&self) -> DagMlErrorDescriptor
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.
Trait Implementations§
Source§impl Debug for DagMlError
impl Debug for DagMlError
Source§impl Display for DagMlError
impl Display for DagMlError
Source§impl Error for DagMlError
impl Error for DagMlError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for DagMlError
impl From<Error> for DagMlError
Source§fn from(source: Error) -> DagMlError
fn from(source: Error) -> DagMlError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for DagMlError
impl !UnwindSafe for DagMlError
impl Freeze for DagMlError
impl Send for DagMlError
impl Sync for DagMlError
impl Unpin for DagMlError
impl UnsafeUnpin for DagMlError
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
Mutably borrows from an owned value. Read more