pub enum EscalationOutcome {
Succeeded(AgentResult),
EscalateToHuman {
reason: String,
},
Recovered {
via: String,
result: AgentResult,
},
}Expand description
What should happen after a delegate call returns.
Variants§
Succeeded(AgentResult)
The delegate succeeded — carry the result upstream.
EscalateToHuman
The delegate failed; the orchestrator should pause the task and
surface reason to the user via the channel router.
Recovered
The delegate failed on a retryable error; a fallback delegate
took over and succeeded. via is the fallback’s name.
Implementations§
Source§impl EscalationOutcome
impl EscalationOutcome
pub fn succeeded(&self) -> bool
Sourcepub fn into_result(self) -> Option<AgentResult>
pub fn into_result(self) -> Option<AgentResult>
Unwrap to an AgentResult when the outcome represents a finished
run (either on the primary or a fallback). Returns None for
EscalateToHuman.
Trait Implementations§
Source§impl Clone for EscalationOutcome
impl Clone for EscalationOutcome
Auto Trait Implementations§
impl Freeze for EscalationOutcome
impl RefUnwindSafe for EscalationOutcome
impl Send for EscalationOutcome
impl Sync for EscalationOutcome
impl Unpin for EscalationOutcome
impl UnsafeUnpin for EscalationOutcome
impl UnwindSafe for EscalationOutcome
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