pub enum AgentError {
Message(String),
MaxStepsExceeded {
max_steps: usize,
},
ProviderError {
source: ProviderError,
},
RequiresRuntime,
}Expand description
Agent 错误
Variants§
Message(String)
通用错误消息
MaxStepsExceeded
超过最大步数限制
ProviderError
Provider 错误
Fields
§
source: ProviderErrorRequiresRuntime
需要 Runtime 支持(Agent 返回了需要 Runtime 执行的决策)
Trait Implementations§
Source§impl Debug for AgentError
impl Debug for AgentError
Source§impl DiagnosticError for AgentError
impl DiagnosticError for AgentError
Source§fn diagnostic(&self) -> ErrorDiagnostic
fn diagnostic(&self) -> ErrorDiagnostic
获取错误的诊断信息
Source§fn is_retriable(&self) -> bool
fn is_retriable(&self) -> bool
判断是否可重试
Source§fn category(&self) -> ErrorCategory
fn category(&self) -> ErrorCategory
获取错误类别
Source§impl Display for AgentError
impl Display for AgentError
Source§impl Error for AgentError
impl Error for AgentError
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 AgentError
impl !RefUnwindSafe for AgentError
impl Send for AgentError
impl Sync for AgentError
impl Unpin for AgentError
impl UnsafeUnpin for AgentError
impl !UnwindSafe for AgentError
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