pub struct ToolExecutor<A: ToolAdapter> { /* private fields */ }Expand description
Policy-aware tool executor.
Implementations§
Source§impl<A: ToolAdapter> ToolExecutor<A>
impl<A: ToolAdapter> ToolExecutor<A>
pub fn new( registry: ToolRegistry, policy: PolicyMatrix, adapter: A, config: ToolExecutionConfig, ) -> Self
Sourcepub fn new_with_safe_defaults(
registry: ToolRegistry,
adapter: A,
config: ToolExecutionConfig,
) -> Self
pub fn new_with_safe_defaults( registry: ToolRegistry, adapter: A, config: ToolExecutionConfig, ) -> Self
Convenience constructor that applies secure policy defaults.
pub async fn execute( &self, call: ToolInvocation, run_id: Option<String>, ) -> Result<ToolExecutionReport, ToolExecutionError>
Auto Trait Implementations§
impl<A> !Freeze for ToolExecutor<A>
impl<A> !RefUnwindSafe for ToolExecutor<A>
impl<A> Send for ToolExecutor<A>
impl<A> Sync for ToolExecutor<A>
impl<A> Unpin for ToolExecutor<A>where
A: Unpin,
impl<A> UnsafeUnpin for ToolExecutor<A>where
A: UnsafeUnpin,
impl<A> !UnwindSafe for ToolExecutor<A>
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
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>
Converts
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>
Converts
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