pub struct McpResourceHandle { /* private fields */ }Expand description
Adapter exposing a single MCP resource as a ResourceProvider.
Trait Implementations§
Source§impl ResourceProvider for McpResourceHandle
impl ResourceProvider for McpResourceHandle
Source§fn list_resources<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ResourceDescriptor>, CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_resources<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ResourceDescriptor>, CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all resources currently available from this provider. Read more
Source§fn read_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 ResourceId,
_ctx: &'life2 mut CapabilityContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<ResourceContents, CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 ResourceId,
_ctx: &'life2 mut CapabilityContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<ResourceContents, CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Reads the contents of the resource identified by
id. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for McpResourceHandle
impl !UnwindSafe for McpResourceHandle
impl Freeze for McpResourceHandle
impl Send for McpResourceHandle
impl Sync for McpResourceHandle
impl Unpin for McpResourceHandle
impl UnsafeUnpin for McpResourceHandle
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