pub struct PlanExecutor<H: HttpExecutor> { /* private fields */ }Expand description
Executes a compiled execution plan.
Implementations§
Source§impl<H: HttpExecutor> PlanExecutor<H>
impl<H: HttpExecutor> PlanExecutor<H>
Sourcepub fn new(http: H, config: ExecutionConfig) -> Self
pub fn new(http: H, config: ExecutionConfig) -> Self
Create a new executor with the given HTTP client.
Sourcepub fn set_mcp_executor(&mut self, executor: impl McpExecutor + 'static)
pub fn set_mcp_executor(&mut self, executor: impl McpExecutor + 'static)
Set the MCP executor for foundation server calls.
Sourcepub fn set_sdk_executor(&mut self, executor: impl SdkExecutor + 'static)
pub fn set_sdk_executor(&mut self, executor: impl SdkExecutor + 'static)
Set the SDK executor for SDK-backed servers.
Sourcepub fn set_variable(&mut self, name: impl Into<String>, value: JsonValue)
pub fn set_variable(&mut self, name: impl Into<String>, value: JsonValue)
Pre-bind a variable before execution (e.g., args for script tools).
Sourcepub async fn execute(
&mut self,
plan: &ExecutionPlan,
) -> Result<ExecutionResult, ExecutionError>
pub async fn execute( &mut self, plan: &ExecutionPlan, ) -> Result<ExecutionResult, ExecutionError>
Execute a plan and return the result.
Auto Trait Implementations§
impl<H> Freeze for PlanExecutor<H>where
H: Freeze,
impl<H> !RefUnwindSafe for PlanExecutor<H>
impl<H> Send for PlanExecutor<H>
impl<H> Sync for PlanExecutor<H>
impl<H> Unpin for PlanExecutor<H>where
H: Unpin,
impl<H> UnsafeUnpin for PlanExecutor<H>where
H: UnsafeUnpin,
impl<H> !UnwindSafe for PlanExecutor<H>
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 moreCreates a shared type from an unshared type.