pub struct ResourceHandler;
Expand description
Handler for resource-related requests
Implementations§
Source§impl ResourceHandler
impl ResourceHandler
Sourcepub async fn handle_list(
resources: &HashMap<String, Resource>,
params: Option<Value>,
) -> McpResult<ListResourcesResult>
pub async fn handle_list( resources: &HashMap<String, Resource>, params: Option<Value>, ) -> McpResult<ListResourcesResult>
Handle resources/list request
Sourcepub async fn handle_read(
resources: &HashMap<String, Resource>,
params: Option<Value>,
) -> McpResult<ReadResourceResult>
pub async fn handle_read( resources: &HashMap<String, Resource>, params: Option<Value>, ) -> McpResult<ReadResourceResult>
Handle resources/read request
Sourcepub async fn handle_subscribe(
resources: &HashMap<String, Resource>,
params: Option<Value>,
) -> McpResult<SubscribeResourceResult>
pub async fn handle_subscribe( resources: &HashMap<String, Resource>, params: Option<Value>, ) -> McpResult<SubscribeResourceResult>
Handle resources/subscribe request
Sourcepub async fn handle_unsubscribe(
resources: &HashMap<String, Resource>,
params: Option<Value>,
) -> McpResult<UnsubscribeResourceResult>
pub async fn handle_unsubscribe( resources: &HashMap<String, Resource>, params: Option<Value>, ) -> McpResult<UnsubscribeResourceResult>
Handle resources/unsubscribe request
Auto Trait Implementations§
impl Freeze for ResourceHandler
impl RefUnwindSafe for ResourceHandler
impl Send for ResourceHandler
impl Sync for ResourceHandler
impl Unpin for ResourceHandler
impl UnwindSafe for ResourceHandler
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