#[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<RunStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RunStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RunStatus
impl Serialize for RunStatus
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for RunStatus
Auto Trait Implementations§
impl Forget for RunStatus
impl Freeze for RunStatuswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<EffectKey>: Freeze,
PhantomData<String>: Freeze,
*const ApprovalCard is !null: Freeze,
PhantomData<ApprovalCard>: Freeze,
impl Move for RunStatus
impl RefUnwindSafe for RunStatus
impl Send for RunStatus
impl Sync for RunStatus
impl Unpin for RunStatus
impl UnsafeUnpin for RunStatuswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<EffectKey>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const ApprovalCard is !null: UnsafeUnpin,
PhantomData<ApprovalCard>: UnsafeUnpin,
impl UnwindSafe for RunStatuswhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BoxRaw<ApprovalCard>: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more