pub struct Manager { /* private fields */ }Implementations§
Source§impl Manager
impl Manager
pub fn new(definitions: ConnectorFile) -> Result<Self, McpError>
pub fn snapshot(&self) -> ConnectorFile
pub fn list(&self) -> Vec<ConnectorView>
pub async fn add( &mut self, connector: Connector, store: &ConnectorStore, ) -> Result<(), McpError>
pub async fn remove( &mut self, id: &str, store: &ConnectorStore, ) -> Result<(), McpError>
pub fn tools(&self) -> Vec<(String, Tool)>
pub async fn connect( &mut self, id: &str, factory: &dyn ClientFactory, cancel: &CancellationToken, ) -> Result<(), McpError>
pub async fn attach( &mut self, id: &str, connection: Box<dyn Connection>, cancel: &CancellationToken, ) -> Result<(), McpError>
pub fn review( &self, id: &str, name: &str, arguments: Value, ) -> Result<ReviewedCall, McpError>
pub fn approve(&self, reviewed: ReviewedCall) -> Result<Approval, McpError>
pub fn approve_session( &self, reviewed: ReviewedCall, grants: &mut SessionGrants, ) -> Result<Approval, McpError>
pub fn session_approval( &self, reviewed: ReviewedCall, grants: &SessionGrants, ) -> Result<Approval, McpError>
pub async fn call( &mut self, id: &str, name: &str, arguments: Value, approval: Option<Approval>, cancel: &CancellationToken, ) -> Result<ToolResult, McpError>
pub async fn disconnect(&mut self, id: &str) -> Result<(), McpError>
pub async fn replace( &mut self, file: ConnectorFile, store: &ConnectorStore, ) -> Result<(), McpError>
pub async fn shutdown(&mut self) -> Result<(), McpError>
Auto Trait Implementations§
impl !RefUnwindSafe for Manager
impl !UnwindSafe for Manager
impl Forget for Manager
impl Freeze for Manager
impl Send for Manager
impl Sync for Manager
impl Unpin for Manager
impl UnsafeUnpin for Manager
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