pub struct GComposite {
pub guards: Vec<GGuard>,
}Expand description
A composite of guards — all must pass for output to be accepted.
Fields§
§guards: Vec<GGuard>The guards in this composite.
Implementations§
Source§impl GComposite
impl GComposite
Sourcepub fn check_all(&self, output: &str) -> Vec<String>
pub fn check_all(&self, output: &str) -> Vec<String>
Check all guards against the output (sync path; LLM-judge guards are
skipped — see GComposite::check_all_async). Returns all violations.
Source§impl GComposite
impl GComposite
Sourcepub fn into_middleware(self) -> Arc<dyn Middleware>
pub fn into_middleware(self) -> Arc<dyn Middleware>
Adapt this guard composite into an after_model middleware layer that
vetoes any model response failing one or more guards.
Trait Implementations§
Source§impl BitOr<GGuard> for GComposite
impl BitOr<GGuard> for GComposite
Source§impl Clone for GComposite
impl Clone for GComposite
Source§fn clone(&self) -> GComposite
fn clone(&self) -> GComposite
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GComposite
impl !RefUnwindSafe for GComposite
impl Send for GComposite
impl Sync for GComposite
impl Unpin for GComposite
impl !UnwindSafe for GComposite
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