pub struct DefaultProtocolPolicy;Expand description
The generic, vocabulary-free policy installed when a caller does not supply one. Every method takes its trait default.
Trait Implementations§
Source§impl Clone for DefaultProtocolPolicy
impl Clone for DefaultProtocolPolicy
Source§fn clone(&self) -> DefaultProtocolPolicy
fn clone(&self) -> DefaultProtocolPolicy
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 DefaultProtocolPolicy
impl Debug for DefaultProtocolPolicy
Source§impl Default for DefaultProtocolPolicy
impl Default for DefaultProtocolPolicy
Source§fn default() -> DefaultProtocolPolicy
fn default() -> DefaultProtocolPolicy
Returns the “default value” for a type. Read more
Source§impl ProtocolPolicy for DefaultProtocolPolicy
impl ProtocolPolicy for DefaultProtocolPolicy
Source§fn terminal_tool_names(&self) -> HashSet<String>
fn terminal_tool_names(&self) -> HashSet<String>
Tool names — besides the configured terminal fallback tool — that
count as terminal/delivery tools when the loop decides whether a
turn’s allowlist has narrowed to “terminal only” (the gate the
plain-text-terminal fallback waits for in its non-eager mode). Read more
Source§fn plain_text_recovery_prompt(
&self,
_ctx: PlainTextRecoveryContext<'_>,
) -> Option<String>
fn plain_text_recovery_prompt( &self, _ctx: PlainTextRecoveryContext<'_>, ) -> Option<String>
Recovery prose injected as a system message when the model emits
plain text with no tool call and the loop wants to nudge it back
onto the protocol. Read more
Source§fn normalize_tool_calls(
&self,
_calls: &mut [ToolCall],
_registry: &ToolRegistry,
) -> usize
fn normalize_tool_calls( &self, _calls: &mut [ToolCall], _registry: &ToolRegistry, ) -> usize
Rewrite a model-emitted tool-call batch in place before registry
lookup — e.g. fold a known alias name into a canonical tool and
move the alias into an argument. Returns the number of calls
rewritten (for diagnostics; the loop does not require it). Read more
Render an error for a tool hidden by per-turn narrowing, when no
crate::plugin::ToolGate claimed responsibility for the denial. Read moreimpl Copy for DefaultProtocolPolicy
Auto Trait Implementations§
impl Freeze for DefaultProtocolPolicy
impl RefUnwindSafe for DefaultProtocolPolicy
impl Send for DefaultProtocolPolicy
impl Sync for DefaultProtocolPolicy
impl Unpin for DefaultProtocolPolicy
impl UnsafeUnpin for DefaultProtocolPolicy
impl UnwindSafe for DefaultProtocolPolicy
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