pub struct McpRouteTable { /* private fields */ }Expand description
Bounded in-memory capability route table.
Implementations§
Source§impl McpRouteTable
impl McpRouteTable
Sourcepub fn install_pending(
self: &Arc<Self>,
transaction_id: TransactionId,
tools: ResolvedToolSet,
dispatcher: Arc<TransactionToolDispatcher>,
exchange_id: ExchangeId,
base_url: &str,
) -> Result<PendingMcpBinding, McpInstallError>
pub fn install_pending( self: &Arc<Self>, transaction_id: TransactionId, tools: ResolvedToolSet, dispatcher: Arc<TransactionToolDispatcher>, exchange_id: ExchangeId, base_url: &str, ) -> Result<PendingMcpBinding, McpInstallError>
Install a pending binding and return the redacted descriptor URL.
Sourcepub fn activate(&self, token: &CapabilityToken) -> Result<(), McpInstallError>
pub fn activate(&self, token: &CapabilityToken) -> Result<(), McpInstallError>
Activate a pending route after SessionKey claim / MCP refresh.
Sourcepub fn revoke(&self, token: &CapabilityToken) -> bool
pub fn revoke(&self, token: &CapabilityToken) -> bool
Revoke and remove a route. Idempotent for unknown tokens.
Sourcepub fn revoke_all(&self) -> Vec<String>
pub fn revoke_all(&self) -> Vec<String>
Revoke every route (shutdown). Returns hex tokens that were live.
Sourcepub fn get_by_hex(&self, hex: &str) -> Option<Arc<McpBinding>>
pub fn get_by_hex(&self, hex: &str) -> Option<Arc<McpBinding>>
Lookup live binding by token hex (from URL).
Sourcepub fn get(&self, token: &CapabilityToken) -> Option<Arc<McpBinding>>
pub fn get(&self, token: &CapabilityToken) -> Option<Arc<McpBinding>>
Lookup by token.
Sourcepub fn state_of(&self, token: &CapabilityToken) -> Option<McpBindingState>
pub fn state_of(&self, token: &CapabilityToken) -> Option<McpBindingState>
State for a token if present.
Auto Trait Implementations§
impl !Freeze for McpRouteTable
impl RefUnwindSafe for McpRouteTable
impl Send for McpRouteTable
impl Sync for McpRouteTable
impl Unpin for McpRouteTable
impl UnsafeUnpin for McpRouteTable
impl UnwindSafe for McpRouteTable
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