pub struct SQLiteRouter { /* private fields */ }
Expand description
SQLite MCP服务器路由器
负责处理MCP客户端请求,执行SQL操作,并返回结果
Implementations§
Trait Implementations§
Source§impl Clone for SQLiteRouter
impl Clone for SQLiteRouter
Source§impl Router for SQLiteRouter
impl Router for SQLiteRouter
fn name(&self) -> String
fn instructions(&self) -> String
fn capabilities(&self) -> ServerCapabilities
fn list_tools(&self) -> Vec<Tool>
fn call_tool( &self, tool_name: &str, arguments: Value, ) -> Pin<Box<dyn Future<Output = Result<Vec<Content>, ToolError>> + Send + 'static>>
fn list_resources(&self) -> Vec<Resource>
fn read_resource( &self, _uri: &str, ) -> Pin<Box<dyn Future<Output = Result<String, ResourceError>> + Send + 'static>>
fn list_prompts(&self) -> Vec<Prompt>
fn get_prompt( &self, _prompt_name: &str, ) -> Pin<Box<dyn Future<Output = Result<String, PromptError>> + Send + 'static>>
fn create_response(&self, id: Option<u64>) -> JsonRpcResponse
fn handle_initialize( &self, req: JsonRpcRequest, ) -> impl Future<Output = Result<JsonRpcResponse, RouterError>> + Send
fn handle_tools_list( &self, req: JsonRpcRequest, ) -> impl Future<Output = Result<JsonRpcResponse, RouterError>> + Send
fn handle_tools_call( &self, req: JsonRpcRequest, ) -> impl Future<Output = Result<JsonRpcResponse, RouterError>> + Send
fn handle_resources_list( &self, req: JsonRpcRequest, ) -> impl Future<Output = Result<JsonRpcResponse, RouterError>> + Send
fn handle_resources_read( &self, req: JsonRpcRequest, ) -> impl Future<Output = Result<JsonRpcResponse, RouterError>> + Send
fn handle_prompts_list( &self, req: JsonRpcRequest, ) -> impl Future<Output = Result<JsonRpcResponse, RouterError>> + Send
fn handle_prompts_get( &self, req: JsonRpcRequest, ) -> impl Future<Output = Result<JsonRpcResponse, RouterError>> + Send
Auto Trait Implementations§
impl Freeze for SQLiteRouter
impl !RefUnwindSafe for SQLiteRouter
impl Send for SQLiteRouter
impl Sync for SQLiteRouter
impl Unpin for SQLiteRouter
impl !UnwindSafe for SQLiteRouter
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