pub struct JsonValidGate;Expand description
Passes only if the completion parses as JSON. Useful for structured-output routes.
Trait Implementations§
Source§impl Clone for JsonValidGate
impl Clone for JsonValidGate
Source§fn clone(&self) -> JsonValidGate
fn clone(&self) -> JsonValidGate
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 moreimpl Copy for JsonValidGate
Source§impl Debug for JsonValidGate
impl Debug for JsonValidGate
Source§impl Gate for JsonValidGate
impl Gate for JsonValidGate
Source§fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 ModelRequest,
resp: &'life2 ModelResponse,
) -> Pin<Box<dyn Future<Output = GateResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 ModelRequest,
resp: &'life2 ModelResponse,
) -> Pin<Box<dyn Future<Output = GateResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Evaluate the candidate response, producing a verdict + evidence.
Auto Trait Implementations§
impl Freeze for JsonValidGate
impl RefUnwindSafe for JsonValidGate
impl Send for JsonValidGate
impl Sync for JsonValidGate
impl Unpin for JsonValidGate
impl UnsafeUnpin for JsonValidGate
impl UnwindSafe for JsonValidGate
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