pub struct EvalExpectation {
pub contains: Option<String>,
pub not_contains: Option<String>,
pub equals: Option<String>,
pub json_schema: Option<Value>,
pub extra: HashMap<String, Value>,
}Expand description
Assertions for an eval.
Fields§
§contains: Option<String>The output must contain this substring.
not_contains: Option<String>The output must not contain this substring.
equals: Option<String>The output must exactly equal this string.
json_schema: Option<Value>A JSON schema the output must validate against (if format is JSON).
extra: HashMap<String, Value>Any additional custom assertions (forward-compatibility).
Trait Implementations§
Source§impl Clone for EvalExpectation
impl Clone for EvalExpectation
Source§fn clone(&self) -> EvalExpectation
fn clone(&self) -> EvalExpectation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvalExpectation
impl Debug for EvalExpectation
Source§impl<'de> Deserialize<'de> for EvalExpectation
impl<'de> Deserialize<'de> for EvalExpectation
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EvalExpectation
impl PartialEq for EvalExpectation
Source§fn eq(&self, other: &EvalExpectation) -> bool
fn eq(&self, other: &EvalExpectation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EvalExpectation
impl Serialize for EvalExpectation
impl StructuralPartialEq for EvalExpectation
Auto Trait Implementations§
impl Freeze for EvalExpectation
impl RefUnwindSafe for EvalExpectation
impl Send for EvalExpectation
impl Sync for EvalExpectation
impl Unpin for EvalExpectation
impl UnsafeUnpin for EvalExpectation
impl UnwindSafe for EvalExpectation
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