pub struct MockFailingTool { /* private fields */ }Available on crate feature
test-utils only.Expand description
A tool that always fails with a configured ToolErrorKind. Used to exercise structured
tool-failure surfacing (timeout, not-found, rate-limited, …) without a live
provider. Registered under the name flaky_tool.
Implementations§
Source§impl MockFailingTool
impl MockFailingTool
Sourcepub fn new(kind: ToolErrorKind) -> Self
pub fn new(kind: ToolErrorKind) -> Self
A tool that fails with the given classification every call.
Trait Implementations§
Source§impl Clone for MockFailingTool
impl Clone for MockFailingTool
Source§fn clone(&self) -> MockFailingTool
fn clone(&self) -> MockFailingTool
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 Tool for MockFailingTool
impl Tool for MockFailingTool
Source§type Error = MockFailure
type Error = MockFailure
Typed error returned by direct calls to this tool. Read more
Source§fn description(&self) -> String
fn description(&self) -> String
Model-facing description.
Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema for arguments.
Auto Trait Implementations§
impl Freeze for MockFailingTool
impl RefUnwindSafe for MockFailingTool
impl Send for MockFailingTool
impl Sync for MockFailingTool
impl Unpin for MockFailingTool
impl UnsafeUnpin for MockFailingTool
impl UnwindSafe for MockFailingTool
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