#[non_exhaustive]pub enum StructuredOutcome {
Passed,
Retry {
message: Message,
},
Exhausted {
max_retries: usize,
},
}Expand description
The outcome of a single validation
(StructuredValidator::validate return value).
Passed: the answer conforms to the schema; the run wraps up;Retry: validation failed, carrying a model-facing feedback message — recorded as a User message so the model corrects itself in the next round;Exhausted: the retry budget is exhausted; the run fails.
The enum carries #[non_exhaustive]: future outcomes won’t be a breaking
change; matches should include a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Passed
Passed: the answer conforms to the schema.
Retry
Validation failed, carrying a feedback message (model-facing, recorded as a User message so the model corrects itself).
Exhausted
Retry budget exhausted, carrying the limit.
Trait Implementations§
Source§impl Clone for StructuredOutcome
impl Clone for StructuredOutcome
Source§impl Debug for StructuredOutcome
impl Debug for StructuredOutcome
impl Eq for StructuredOutcome
Source§impl PartialEq for StructuredOutcome
impl PartialEq for StructuredOutcome
impl StructuralPartialEq for StructuredOutcome
Auto Trait Implementations§
impl Freeze for StructuredOutcome
impl RefUnwindSafe for StructuredOutcome
impl Send for StructuredOutcome
impl Sync for StructuredOutcome
impl Unpin for StructuredOutcome
impl UnsafeUnpin for StructuredOutcome
impl UnwindSafe for StructuredOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.