pub struct MockJudge {
pub verdict: JudgeVerdict,
pub reason: String,
}Expand description
Deterministic mock — used by replay tests and any caller that wants to stub the judge for offline analysis.
Fields§
§verdict: JudgeVerdictForce every call to return this verdict.
reason: StringReason string echoed verbatim on every call.
Trait Implementations§
Source§impl JudgeProvider for MockJudge
impl JudgeProvider for MockJudge
Source§fn judge<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_input: &'life1 str,
_orig: &'life2 str,
_prop: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(JudgeVerdict, String), QualityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn judge<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_input: &'life1 str,
_orig: &'life2 str,
_prop: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(JudgeVerdict, String), QualityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Compare an “original” response and a “proposed” response for the same
input. Return a verdict + one-line reason. Read more
Auto Trait Implementations§
impl Freeze for MockJudge
impl RefUnwindSafe for MockJudge
impl Send for MockJudge
impl Sync for MockJudge
impl Unpin for MockJudge
impl UnsafeUnpin for MockJudge
impl UnwindSafe for MockJudge
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