pub trait OutputValidator: Send + Sync {
// Required method
fn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut AgentRunState,
output: &'life2 OutputValue,
) -> Pin<Box<dyn Future<Output = OutputValidationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Validator for parsed structured output values.
Required Methods§
Sourcefn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut AgentRunState,
output: &'life2 OutputValue,
) -> Pin<Box<dyn Future<Output = OutputValidationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut AgentRunState,
output: &'life2 OutputValue,
) -> Pin<Box<dyn Future<Output = OutputValidationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Validate a parsed output value.
§Errors
Returns an error when validation fails or should trigger a model retry.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".