pub enum AgentConfigError {
MaxIterationsZero(usize),
MaxParallelToolsZero(usize),
ToolTimeoutTooLow(u64),
ContextBudgetTooLow(usize),
}Expand description
Error returned when AgentConfig::validated detects an invalid field.
Each variant names the exact invariant that was violated and carries the offending value so callers (HTTP handlers, CLI) can surface a precise diagnostic without re-inspecting the config.
Variants§
MaxIterationsZero(usize)
max_iterations must be ≥ 1 — zero would make the loop exit
immediately as MaxIterationsReached(0) without ever calling the LLM.
MaxParallelToolsZero(usize)
max_parallel_tools must be ≥ 1 — zero would deadlock the
Semaphore used for tool-call concurrency (no permit can ever be
acquired).
ToolTimeoutTooLow(u64)
tool_timeout_ms must be ≥ MIN_TOOL_TIMEOUT_MS — a value below
the floor would silently time out every tool call, making tool
calling unusable without a clear error.
ContextBudgetTooLow(usize)
context_budget_chars must be >= MIN_CONTEXT_BUDGET_CHARS — a value
below the floor would cause the pruner to discard virtually all context.
Trait Implementations§
Source§impl Clone for AgentConfigError
impl Clone for AgentConfigError
Source§fn clone(&self) -> AgentConfigError
fn clone(&self) -> AgentConfigError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentConfigError
impl Debug for AgentConfigError
Source§impl Display for AgentConfigError
impl Display for AgentConfigError
Source§impl Error for AgentConfigError
impl Error for AgentConfigError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for AgentConfigError
impl PartialEq for AgentConfigError
Source§fn eq(&self, other: &AgentConfigError) -> bool
fn eq(&self, other: &AgentConfigError) -> bool
self and other values to be equal, and is used by ==.