pub struct NoopGuard;Expand description
Default guard — fails on degenerate states, completes on normal flow.
This is the default guard injected when no custom guard is set. It provides basic safety: reasoning-only and empty responses fail, text-only responses complete normally.
Trait Implementations§
Source§impl ReactLoopGuard for NoopGuard
impl ReactLoopGuard for NoopGuard
Source§fn on_turn<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 GuardCtx,
) -> Pin<Box<dyn Future<Output = GuardDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_turn<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 GuardCtx,
) -> Pin<Box<dyn Future<Output = GuardDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unified entry point — guard judges the scene and returns a decision.
Source§fn on_tool_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 GuardCtx,
) -> Pin<Box<dyn Future<Output = GuardDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_tool_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 GuardCtx,
) -> Pin<Box<dyn Future<Output = GuardDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Callback when model calls a tool (new) Read more
Source§fn set_notice(&self, _handle: NoticeHandle)
fn set_notice(&self, _handle: NoticeHandle)
Receive the engine’s notice handle (Batch E). Called once by the
runtime when the guard is registered, before any run starts. Guards
that want to surface display-only notices (e.g. judge degradation)
store the handle; the default implementation ignores it, so existing
implementers are unaffected.
Source§fn set_provider_source(&self, _handle: ProviderHandle)
fn set_provider_source(&self, _handle: ProviderHandle)
Receive the engine’s live provider handle. Called once by the runtime
when the guard is registered (next to
Self::set_notice). A guard
that runs LLM calls of its own (e.g. a completion judge) MUST resolve
its client through this handle instead of holding the provider clone
it was built with: a /model swap replaces the engine’s provider, and
a build-time clone keeps answering as the old model (session
20261107_27dc727a). Default: ignore, so existing implementers are
unaffected.Auto Trait Implementations§
impl Forget for NoopGuard
impl Freeze for NoopGuard
impl Move for NoopGuard
impl RefUnwindSafe for NoopGuard
impl Send for NoopGuard
impl Sync for NoopGuard
impl Unpin for NoopGuard
impl UnsafeUnpin for NoopGuard
impl UnwindSafe for NoopGuard
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