pub enum StepError {
Invalid(String),
Transient(String),
Failed(String),
Other(String),
}Expand description
Error type for agent steps, with variants designed around what the caller can do about them.
Variants§
Invalid(String)
Bad input or agent logic error. Don’t retry, fix the code.
Transient(String)
Transient failure (network, rate limit). Retrying might help.
Failed(String)
Agent decided to fail explicitly via Outcome::Fail.
Other(String)
Everything else. Inspect the message for details.
Implementations§
Trait Implementations§
Source§impl Error for StepError
impl Error for StepError
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 StepError
impl RefUnwindSafe for StepError
impl Send for StepError
impl Sync for StepError
impl Unpin for StepError
impl UnsafeUnpin for StepError
impl UnwindSafe for StepError
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