pub trait StructuredOutputValidator {
// Required method
fn validate_candidate(
&self,
contract: &OutputContract,
validation_attempt_id: ValidationAttemptId,
candidate: &OutputCandidate,
) -> Result<ValidationSuccess, Box<ValidationErrorReport>>;
}Expand description
Port or behavior contract for structured output validator. Implementors should preserve policy, redaction, idempotency, and replay expectations from the surrounding module. Implementations may perform side effects only as described by the trait methods.
Required Methods§
Sourcefn validate_candidate(
&self,
contract: &OutputContract,
validation_attempt_id: ValidationAttemptId,
candidate: &OutputCandidate,
) -> Result<ValidationSuccess, Box<ValidationErrorReport>>
fn validate_candidate( &self, contract: &OutputContract, validation_attempt_id: ValidationAttemptId, candidate: &OutputCandidate, ) -> Result<ValidationSuccess, Box<ValidationErrorReport>>
Validates the application::validation invariants and returns a typed error on failure. Validation is pure and does not perform I/O, dispatch, journal appends, or adapter calls.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".