pub struct MockControlledTool {
pub started: Arc<Notify>,
pub allow_finish: Arc<Notify>,
}Available on crate feature
test-utils only.Expand description
A mock tool that notifies when started and waits for an explicit finish signal.
Fields§
§started: Arc<Notify>Notified when a tool call starts.
allow_finish: Arc<Notify>Waited on before a tool call finishes.
Implementations§
Trait Implementations§
Source§impl Clone for MockControlledTool
impl Clone for MockControlledTool
Source§fn clone(&self) -> MockControlledTool
fn clone(&self) -> MockControlledTool
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 MockControlledTool
impl Tool for MockControlledTool
Source§type Error = MockToolError
type Error = MockToolError
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 MockControlledTool
impl RefUnwindSafe for MockControlledTool
impl Send for MockControlledTool
impl Sync for MockControlledTool
impl Unpin for MockControlledTool
impl UnsafeUnpin for MockControlledTool
impl UnwindSafe for MockControlledTool
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