pub struct McpGatewayHandle { /* private fields */ }Expand description
Cloneable handle for install/activate/revoke without owning the listener.
Implementations§
Source§impl McpGatewayHandle
impl McpGatewayHandle
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Bound loopback address.
Sourcepub fn routes(&self) -> &Arc<McpRouteTable> ⓘ
pub fn routes(&self) -> &Arc<McpRouteTable> ⓘ
Shared route table.
Sourcepub fn install_pending(
&self,
transaction_id: TransactionId,
tools: ResolvedToolSet,
dispatcher: Arc<TransactionToolDispatcher>,
exchange_id: ExchangeId,
) -> Result<PendingMcpBinding, McpInstallError>
pub fn install_pending( &self, transaction_id: TransactionId, tools: ResolvedToolSet, dispatcher: Arc<TransactionToolDispatcher>, exchange_id: ExchangeId, ) -> Result<PendingMcpBinding, McpInstallError>
Install a pending capability for a transaction.
Sourcepub fn activate(&self, token: &CapabilityToken) -> Result<(), McpInstallError>
pub fn activate(&self, token: &CapabilityToken) -> Result<(), McpInstallError>
Activate a pending capability.
Sourcepub fn revoke(&self, token: &CapabilityToken) -> bool
pub fn revoke(&self, token: &CapabilityToken) -> bool
Revoke one capability (idempotent).
Trait Implementations§
Source§impl Clone for McpGatewayHandle
impl Clone for McpGatewayHandle
Source§fn clone(&self) -> McpGatewayHandle
fn clone(&self) -> McpGatewayHandle
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 moreAuto Trait Implementations§
impl Freeze for McpGatewayHandle
impl RefUnwindSafe for McpGatewayHandle
impl Send for McpGatewayHandle
impl Sync for McpGatewayHandle
impl Unpin for McpGatewayHandle
impl UnsafeUnpin for McpGatewayHandle
impl UnwindSafe for McpGatewayHandle
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