pub enum OnValidatorError {
Reject,
Accept,
}Expand description
What happens to a submission when its Rhai validator cannot run: the script
threw, exhausted its operation budget, or returned something that is neither
() nor a string.
Distinct from the validator rejecting the answer, which always refuses the submission back to the model. This knob is only about the script itself failing.
Variants§
Reject
Refuse the submission, sending the script’s error text to the model as
retry feedback. The default: an answer nothing checked must not ship as
if it passed, and a parse_json throw on malformed output is something
the model can act on.
Accept
Record the submission unchecked, as if no validator were declared. For blueprints that would rather have an unchecked answer than a failed run. The broken script is still flagged on the run either way.
Trait Implementations§
Source§impl Clone for OnValidatorError
impl Clone for OnValidatorError
impl Copy for OnValidatorError
Source§impl Debug for OnValidatorError
impl Debug for OnValidatorError
Source§impl Default for OnValidatorError
impl Default for OnValidatorError
Source§impl<'de> Deserialize<'de> for OnValidatorError
impl<'de> Deserialize<'de> for OnValidatorError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for OnValidatorError
Source§impl PartialEq for OnValidatorError
impl PartialEq for OnValidatorError
Source§impl Serialize for OnValidatorError
impl Serialize for OnValidatorError
impl StructuralPartialEq for OnValidatorError
Auto Trait Implementations§
impl Freeze for OnValidatorError
impl RefUnwindSafe for OnValidatorError
impl Send for OnValidatorError
impl Sync for OnValidatorError
impl Unpin for OnValidatorError
impl UnsafeUnpin for OnValidatorError
impl UnwindSafe for OnValidatorError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.