pub enum GuardDecision {
Continue {
nudge: Option<String>,
},
Complete,
Fail {
error: String,
},
DisableThinking {
nudge: String,
},
RestoreThinking,
}Expand description
Guard decision — returned by guard, executed by base loop.
Variants§
Continue
Continue loop, optionally inject nudge message
Complete
Normal completion (fire_turn_end + RunOutcome::Completed)
Fail
Abnormal termination (fire_guard_fail + RunOutcome::Failed)
DisableThinking
Temporarily disable thinking functionality
Used for reasoning-only loop scenarios: model keeps thinking but produces no output. After calling, runtime will:
- Set thinking_disabled_for_rest_of_run = true
- Inject nudge message
- Continue loop
RestoreThinking
Restore thinking functionality to previous state
Used for thinking recovery scenarios: model starts working normally (has text or tool call). After calling, runtime will:
- Restore thinking_disabled_for_rest_of_run to original state
- Reset related counters
Trait Implementations§
Source§impl Clone for GuardDecision
impl Clone for GuardDecision
Source§fn clone(&self) -> GuardDecision
fn clone(&self) -> GuardDecision
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GuardDecision
impl Debug for GuardDecision
Source§impl<'de> Deserialize<'de> for GuardDecision
impl<'de> Deserialize<'de> for GuardDecision
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GuardDecision, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GuardDecision, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for GuardDecision
impl Serialize for GuardDecision
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
Auto Trait Implementations§
impl Freeze for GuardDecision
impl RefUnwindSafe for GuardDecision
impl Send for GuardDecision
impl Sync for GuardDecision
impl Unpin for GuardDecision
impl UnsafeUnpin for GuardDecision
impl UnwindSafe for GuardDecision
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