pub enum MCPInit<TCtx>{
Params(MCPParams),
Func(Arc<dyn Fn(&TCtx) -> Result<MCPParams, BoxedError> + Send + Sync>),
AsyncFunc(Arc<dyn Fn(&TCtx) -> BoxFuture<'static, Result<MCPParams, BoxedError>> + Send + Sync>),
}Expand description
Either a fixed MCP configuration or a resolver that derives parameters from the agent context.
Variants§
Params(MCPParams)
Func(Arc<dyn Fn(&TCtx) -> Result<MCPParams, BoxedError> + Send + Sync>)
AsyncFunc(Arc<dyn Fn(&TCtx) -> BoxFuture<'static, Result<MCPParams, BoxedError>> + Send + Sync>)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<TCtx> Freeze for MCPInit<TCtx>
impl<TCtx> !RefUnwindSafe for MCPInit<TCtx>
impl<TCtx> Send for MCPInit<TCtx>
impl<TCtx> Sync for MCPInit<TCtx>
impl<TCtx> Unpin for MCPInit<TCtx>
impl<TCtx> !UnwindSafe for MCPInit<TCtx>
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