pub enum DecisionError {
NotFound(String),
TypeMismatch {
name: String,
expected: &'static str,
actual: &'static str,
},
}Expand description
Error raised when accessing a typed answer on a
DecisionOutput by name.
Distinct from AgentError: this is a lookup error on an already-received
decision result, not a backend failure.
§Examples
use ironflow_core::error::DecisionError;
let err = DecisionError::NotFound("dept".to_string());
assert_eq!(err.to_string(), "no decision answer named 'dept'");Variants§
NotFound(String)
No answer exists under the requested name.
TypeMismatch
An answer exists but is a different kind than requested.
Trait Implementations§
Source§impl Debug for DecisionError
impl Debug for DecisionError
Source§impl Display for DecisionError
impl Display for DecisionError
Source§impl Error for DecisionError
impl Error for DecisionError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for DecisionError
impl RefUnwindSafe for DecisionError
impl Send for DecisionError
impl Sync for DecisionError
impl Unpin for DecisionError
impl UnsafeUnpin for DecisionError
impl UnwindSafe for DecisionError
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