#[non_exhaustive]pub struct WorkbookToolError {
pub code: String,
pub field: Option<String>,
pub reason: String,
pub allowed: Option<Vec<String>>,
pub range: Option<(Value, Value)>,
pub required: Option<Vec<String>>,
}Expand description
One structured tool-execution error (WBSV-06): a machine-actionable repair
payload. The agent reads allowed/range/required to repair the call —
“allowed-values live in the error”.
code is one of the four stable machine-readable strings documented in the
module-level self-repair table.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: StringThe stable error code (one of the four documented codes).
field: Option<String>The offending input field, when located.
reason: StringA human-readable reason.
allowed: Option<Vec<String>>The allowed alternatives (e.g. the variable-tier override keys for a
strict_constant_override, or the enum members for an out-of-enum value).
range: Option<(Value, Value)>A declared [min, max] range (carried, unenforced this phase).
required: Option<Vec<String>>The required fields (e.g. for missing_field).
Implementations§
Source§impl WorkbookToolError
impl WorkbookToolError
Sourcepub fn invalid_input(reason: impl Into<String>) -> Self
pub fn invalid_input(reason: impl Into<String>) -> Self
invalid_input — an arg-parse / type / enum-membership failure.
Sourcepub fn invalid_input_field(
field: impl Into<String>,
allowed: Vec<String>,
) -> Self
pub fn invalid_input_field( field: impl Into<String>, allowed: Vec<String>, ) -> Self
invalid_input for an unknown input FIELD (WR-05). An unknown input key
is a bad field, NOT an out-of-set option VALUE, so it shares the
invalid_input code with the top-level deny_unknown_fields path.
Carries the offending field and the allowed known input keys so the
agent can repair the call.
Sourcepub fn invalid_enum(
field: impl Into<String>,
allowed: Vec<String>,
reason: impl Into<String>,
) -> Self
pub fn invalid_enum( field: impl Into<String>, allowed: Vec<String>, reason: impl Into<String>, ) -> Self
invalid_input carrying the closed-enum allowed members (an
out-of-enum or non-string-on-string-enum value).
Sourcepub fn missing_field(field: impl Into<String>, required: Vec<String>) -> Self
pub fn missing_field(field: impl Into<String>, required: Vec<String>) -> Self
missing_field — a required input is absent.
Sourcepub fn unsupported_option(
field: impl Into<String>,
allowed: Vec<String>,
) -> Self
pub fn unsupported_option( field: impl Into<String>, allowed: Vec<String>, ) -> Self
unsupported_option — an override value out of the supported set (an
override naming no manifest cell).
Sourcepub fn strict_constant_override(
field: impl Into<String>,
allowed_variable_keys: Vec<String>,
) -> Self
pub fn strict_constant_override( field: impl Into<String>, allowed_variable_keys: Vec<String>, ) -> Self
strict_constant_override — a BA-governed strict constant was supplied as
a calculate input. allowed carries the variable-tier override keys the
caller MAY set instead.
Sourcepub fn unmappable_tool_name(raw: impl Into<String>) -> Self
pub fn unmappable_tool_name(raw: impl Into<String>) -> Self
invalid_tool_name — an output Table name that cannot be sanitized to the
MCP tool-name charset ^[a-zA-Z0-9_-]{1,64}$ (empty or all-illegal). A
fail-closed reject (T-100-10): an uncallable / charset-illegal tool can
never be registered. field carries the offending raw name.
Trait Implementations§
Source§impl Clone for WorkbookToolError
impl Clone for WorkbookToolError
Source§fn clone(&self) -> WorkbookToolError
fn clone(&self) -> WorkbookToolError
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 WorkbookToolError
impl Debug for WorkbookToolError
impl Eq for WorkbookToolError
Source§impl PartialEq for WorkbookToolError
impl PartialEq for WorkbookToolError
Source§fn eq(&self, other: &WorkbookToolError) -> bool
fn eq(&self, other: &WorkbookToolError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WorkbookToolError
Auto Trait Implementations§
impl Freeze for WorkbookToolError
impl RefUnwindSafe for WorkbookToolError
impl Send for WorkbookToolError
impl Sync for WorkbookToolError
impl Unpin for WorkbookToolError
impl UnsafeUnpin for WorkbookToolError
impl UnwindSafe for WorkbookToolError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more