#[non_exhaustive]pub enum RunStatus {
Completed,
Interrupted {
interruption: Interruption,
},
LimitReached {
limit: LimitKind,
},
Stopped {
reason: String,
},
Stuck {
signal: StuckSignal,
},
Cancelled,
ProviderFailed {
error: String,
},
Finished {
outcome: FinishOutcome,
tool: String,
},
}Expand description
Why a run ended. Every exit path maps to exactly one variant, so callers never have to parse prose to learn what happened.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Completed
The model gave a final answer and every stop hook accepted it.
Interrupted
Paused before a tool call; resume with crate::Agent::resume.
Fields
§
interruption: InterruptionLimitReached
Stopped
A custom crate::StopCondition ended the run.
Stuck
Fields
§
signal: StuckSignalCancelled
ProviderFailed
The provider failed in a way the provider layer could not recover.
Finished
A tool ended the run with crate::ToolOutput::finish; tool is
the name of the tool whose finish won. A Succeeded finish in a run
with declined effects (crate::RunState::declined) is reported as
Partial.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunStatus
impl<'de> Deserialize<'de> for RunStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for RunStatus
Auto Trait Implementations§
impl Forget for RunStatus
impl Freeze for RunStatus
impl Move for RunStatus
impl RefUnwindSafe for RunStatus
impl Send for RunStatus
impl Sync for RunStatus
impl Unpin for RunStatus
impl UnsafeUnpin for RunStatus
impl UnwindSafe for RunStatus
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