pub struct RetryLimitedValidator { /* private fields */ }Expand description
Tracks retry count for structured output validation.
Wraps StructuredOutputValidator and enforces a maximum number of
retries. After max_retries validation failures, converts the error
to ToolError::InvalidInput (non-retryable).
Implementations§
Source§impl RetryLimitedValidator
impl RetryLimitedValidator
Sourcepub fn new(validator: StructuredOutputValidator) -> Self
pub fn new(validator: StructuredOutputValidator) -> Self
Create a new retry-limited validator wrapping a StructuredOutputValidator.
Trait Implementations§
Source§impl ToolMiddleware for RetryLimitedValidator
impl ToolMiddleware for RetryLimitedValidator
Source§fn process<'a>(
&'a self,
call: &'a ToolCall,
ctx: &'a ToolContext,
next: Next<'a>,
) -> WasmBoxedFuture<'a, Result<ToolOutput, ToolError>>
fn process<'a>( &'a self, call: &'a ToolCall, ctx: &'a ToolContext, next: Next<'a>, ) -> WasmBoxedFuture<'a, Result<ToolOutput, ToolError>>
Process a tool call, optionally delegating to the next middleware/tool.
Auto Trait Implementations§
impl !Freeze for RetryLimitedValidator
impl RefUnwindSafe for RetryLimitedValidator
impl Send for RetryLimitedValidator
impl Sync for RetryLimitedValidator
impl Unpin for RetryLimitedValidator
impl UnsafeUnpin for RetryLimitedValidator
impl UnwindSafe for RetryLimitedValidator
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