pub struct StaticMCPBridge {
pub source: SourceType,
pub manifest: Option<MCPManifest>,
pub client: Client,
}Fields§
§source: SourceType§manifest: Option<MCPManifest>§client: ClientImplementations§
Source§impl StaticMCPBridge
impl StaticMCPBridge
pub fn new(source_path: String) -> Self
pub async fn load_json( &self, relative_path: &str, ) -> Result<Value, Box<dyn Error>>
pub async fn load_manifest(&mut self) -> Result<&MCPManifest, Box<dyn Error>>
pub fn uri_to_path(&self, uri: &str) -> String
pub fn tool_to_path( &self, tool_name: &str, args: &HashMap<String, Value>, ) -> String
pub async fn handle_initialize(&mut self, id: Option<Value>) -> MCPResponse
pub async fn handle_list_resources(&mut self, id: Option<Value>) -> MCPResponse
pub async fn handle_read_resource( &mut self, id: Option<Value>, params: Value, ) -> MCPResponse
pub async fn handle_list_tools(&mut self, id: Option<Value>) -> MCPResponse
pub async fn handle_call_tool( &mut self, id: Option<Value>, params: Value, ) -> MCPResponse
pub async fn handle_request(&mut self, request: MCPRequest) -> MCPResponse
Auto Trait Implementations§
impl Freeze for StaticMCPBridge
impl !RefUnwindSafe for StaticMCPBridge
impl Send for StaticMCPBridge
impl Sync for StaticMCPBridge
impl Unpin for StaticMCPBridge
impl !UnwindSafe for StaticMCPBridge
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