pub enum EvalError {
Agent {
source: AgentError,
},
CaseNotFound {
id: String,
},
SetNotFound {
id: String,
},
ResultNotFound {
eval_set_id: String,
timestamp: u64,
},
InvalidCase {
reason: String,
},
DuplicateEvaluator {
name: String,
},
InvalidIdentifier {
kind: &'static str,
id: String,
},
Io {
source: Error,
},
Serde {
source: Error,
},
Yaml {
source: Error,
},
}Expand description
The top-level error type for eval operations.
Variants§
Agent
An error from the underlying agent during evaluation.
Fields
source: AgentErrorCaseNotFound
The requested eval case was not found.
SetNotFound
The requested eval set was not found.
ResultNotFound
The requested eval result was not found.
InvalidCase
An eval case definition is invalid.
DuplicateEvaluator
An evaluator name was registered more than once in the same registry.
InvalidIdentifier
A filesystem-facing identifier is invalid.
Io
Filesystem or IO error during persistence.
Serde
Serialization or deserialization failure.
Yaml
YAML deserialization failure.
Implementations§
Source§impl EvalError
impl EvalError
Sourcepub const fn agent(source: AgentError) -> Self
pub const fn agent(source: AgentError) -> Self
Convenience constructor for EvalError::Agent.
Sourcepub fn invalid_case(reason: impl Into<String>) -> Self
pub fn invalid_case(reason: impl Into<String>) -> Self
Convenience constructor for EvalError::InvalidCase.
Sourcepub fn duplicate_evaluator(name: impl Into<String>) -> Self
pub fn duplicate_evaluator(name: impl Into<String>) -> Self
Convenience constructor for EvalError::DuplicateEvaluator.
Sourcepub fn invalid_identifier(kind: &'static str, id: impl Into<String>) -> Self
pub fn invalid_identifier(kind: &'static str, id: impl Into<String>) -> Self
Convenience constructor for EvalError::InvalidIdentifier.
Trait Implementations§
Source§impl Error for EvalError
impl Error for EvalError
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 From<AgentError> for EvalError
impl From<AgentError> for EvalError
Source§fn from(source: AgentError) -> Self
fn from(source: AgentError) -> Self
Auto Trait Implementations§
impl Freeze for EvalError
impl !RefUnwindSafe for EvalError
impl Send for EvalError
impl Sync for EvalError
impl Unpin for EvalError
impl UnsafeUnpin for EvalError
impl !UnwindSafe for EvalError
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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.