pub enum Recovery {
Retry,
OmitLastMessage,
Stop,
}Expand description
What a caller can do about a failed turn.
Failures that are a property of the history cannot be fixed by trying again — every later turn resends that history and fails the same way, which wedges the session. This is the top-level signal for those: it says whether the last user message has to come back out (see the chat adapter’s rewind operation) before the conversation can continue.
Variants§
Retry
Nothing about the history is known to be at fault; resubmitting as-is may work (provider blip, refusal, malformed stream).
OmitLastMessage
The request is too big for the provider. Retrying unchanged fails identically — drop the last user message (typically the one carrying an oversized attachment) and the session can go on.
Stop
An execution contract was violated. Resolve it before issuing more work.
Trait Implementations§
impl Copy for Recovery
impl Eq for Recovery
impl StructuralPartialEq for Recovery
Auto Trait Implementations§
impl Freeze for Recovery
impl RefUnwindSafe for Recovery
impl Send for Recovery
impl Sync for Recovery
impl Unpin for Recovery
impl UnsafeUnpin for Recovery
impl UnwindSafe for Recovery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.