pub enum LimitDecision {
Stop,
Extend {
amount: u64,
},
Forbid,
}Expand description
What an on_limit hook decides about a limit the run has reached.
Variants§
Stop
End the run with crate::RunStatus::LimitReached.
Extend
Raise this limit for the rest of the run. amount is in the limit’s
own unit: turns, billable tokens, tool calls, or milliseconds. An
amount of zero is a LimitDecision::Stop.
Forbid
End the run, whatever any other hook granted.
Trait Implementations§
Source§impl Clone for LimitDecision
impl Clone for LimitDecision
impl Copy for LimitDecision
Source§impl Debug for LimitDecision
impl Debug for LimitDecision
impl Eq for LimitDecision
Source§impl PartialEq for LimitDecision
impl PartialEq for LimitDecision
impl StructuralPartialEq for LimitDecision
Auto Trait Implementations§
impl Forget for LimitDecision
impl Freeze for LimitDecision
impl Move for LimitDecision
impl RefUnwindSafe for LimitDecision
impl Send for LimitDecision
impl Sync for LimitDecision
impl Unpin for LimitDecision
impl UnsafeUnpin for LimitDecision
impl UnwindSafe for LimitDecision
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