pub struct CompositionExecutor { /* private fields */ }Expand description
Executor for running tool composition workflows
The executor takes a tool registry and executes composition expressions, managing context, variables, and control flow.
Implementations§
Source§impl CompositionExecutor
impl CompositionExecutor
Sourcepub fn new(registry: Arc<ToolRegistry>) -> Self
pub fn new(registry: Arc<ToolRegistry>) -> Self
Create a new composition executor with the given tool registry
Sourcepub async fn execute(
&self,
expr: &ToolExpr,
ctx: &mut ExecutionContext,
) -> Result<ToolResult, ToolError>
pub async fn execute( &self, expr: &ToolExpr, ctx: &mut ExecutionContext, ) -> Result<ToolResult, ToolError>
Execute a tool expression with the given context
This method executes the expression and updates the context with
the result, binding it to the _last variable.
Auto Trait Implementations§
impl Freeze for CompositionExecutor
impl !RefUnwindSafe for CompositionExecutor
impl Send for CompositionExecutor
impl Sync for CompositionExecutor
impl Unpin for CompositionExecutor
impl UnsafeUnpin for CompositionExecutor
impl !UnwindSafe for CompositionExecutor
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