pub struct AgentRunError {
pub message: String,
pub run_id: Option<String>,
pub attempts: u32,
pub cause: Option<String>,
}Expand description
Error during agent run execution.
Fields§
§message: StringError message.
run_id: Option<String>The run ID where the error occurred.
attempts: u32Number of attempts made.
cause: Option<String>Original cause (serialized).
Implementations§
Source§impl AgentRunError
impl AgentRunError
Sourcepub fn with_run_id(self, run_id: impl Into<String>) -> Self
pub fn with_run_id(self, run_id: impl Into<String>) -> Self
Set the run ID.
Sourcepub fn with_attempts(self, attempts: u32) -> Self
pub fn with_attempts(self, attempts: u32) -> Self
Set the number of attempts.
Sourcepub fn with_cause(self, cause: impl Into<String>) -> Self
pub fn with_cause(self, cause: impl Into<String>) -> Self
Set the cause.
Trait Implementations§
Source§impl Clone for AgentRunError
impl Clone for AgentRunError
Source§fn clone(&self) -> AgentRunError
fn clone(&self) -> AgentRunError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentRunError
impl Debug for AgentRunError
Source§impl Display for AgentRunError
impl Display for AgentRunError
Source§impl Error for AgentRunError
impl Error for AgentRunError
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()
Source§impl From<AgentRunError> for SerdesAiError
impl From<AgentRunError> for SerdesAiError
Source§fn from(source: AgentRunError) -> Self
fn from(source: AgentRunError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AgentRunError
impl RefUnwindSafe for AgentRunError
impl Send for AgentRunError
impl Sync for AgentRunError
impl Unpin for AgentRunError
impl UnwindSafe for AgentRunError
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