pub struct GatewayExecutors { /* private fields */ }Expand description
Shared, per-server registry of gateway-owned tool executors.
Built once at startup (GatewayExecutors::from_env) and reused across
every request. MCP tools are the exception: their handler depends on the
per-request McpToolParam, so discovery builds them lazily unless a handler
has been pre-registered via GatewayExecutors::insert.
Implementations§
Source§impl GatewayExecutors
impl GatewayExecutors
pub fn from_env(client: Arc<Client>) -> Self
pub fn insert(&mut self, registration: impl Into<GatewayExecutorRegistration>)
pub fn web_search_handler(&self) -> Option<Arc<dyn GatewayExecutor>>
Sourcepub async fn mcp_handler(
&mut self,
param: &McpToolParam,
) -> Result<Vec<McpDiscoveredHandler>, ToolError>
pub async fn mcp_handler( &mut self, param: &McpToolParam, ) -> Result<Vec<McpDiscoveredHandler>, ToolError>
Returns the discovered handlers for one request-declared MCP server.
§Errors
Returns a configuration error for an invalid declaration or an empty allowed tool set, and an execution error when the server cannot connect.
Trait Implementations§
Source§impl Clone for GatewayExecutors
impl Clone for GatewayExecutors
Source§fn clone(&self) -> GatewayExecutors
fn clone(&self) -> GatewayExecutors
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 Debug for GatewayExecutors
impl Debug for GatewayExecutors
Source§impl Default for GatewayExecutors
impl Default for GatewayExecutors
Source§fn default() -> GatewayExecutors
fn default() -> GatewayExecutors
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for GatewayExecutors
impl !UnwindSafe for GatewayExecutors
impl Freeze for GatewayExecutors
impl Send for GatewayExecutors
impl Sync for GatewayExecutors
impl Unpin for GatewayExecutors
impl UnsafeUnpin for GatewayExecutors
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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