#[non_exhaustive]pub enum RequestOutcome {
Completed,
Retrying {
error: AgentError,
retry: u32,
max_retries: u32,
delay: Duration,
},
Failed {
error: AgentError,
},
}Expand description
How a request ended.
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 response stream ended.
Retrying
The response stream broke after it opened, and the same request is
sent again after delay as a new request.
Everything streamed since the request started — text, reasoning, tool-call deltas and hosted tool calls — belonged to the broken attempt: none of it enters the conversation and none of its tool calls run. A client drops what it rendered of that attempt.
Fields
§
error: AgentErrorWhy the stream broke.
§
max_retries: u32The most retries the model’s
RetryPolicy allows.
Failed
The request failed and the run fails with the error.
Fields
§
error: AgentErrorWhat went wrong.
Trait Implementations§
Source§impl Clone for RequestOutcome
impl Clone for RequestOutcome
Auto Trait Implementations§
impl !RefUnwindSafe for RequestOutcome
impl !UnwindSafe for RequestOutcome
impl Forget for RequestOutcome
impl Freeze for RequestOutcome
impl Move for RequestOutcome
impl Send for RequestOutcome
impl Sync for RequestOutcome
impl Unpin for RequestOutcome
impl UnsafeUnpin for RequestOutcome
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