pub struct ResourceDefinition {
pub resource: Resource,
pub handler: Arc<dyn Fn(ReadResourceRequest) -> Pin<Box<dyn Future<Output = McpResult<ReadResourceResult>> + Send + 'static>> + Send + Sync + 'static>,
}Expand description
Resource definition from a plugin
Fields§
§resource: Resource§handler: Arc<dyn Fn(ReadResourceRequest) -> Pin<Box<dyn Future<Output = McpResult<ReadResourceResult>> + Send + 'static>> + Send + Sync + 'static>Implementations§
Auto Trait Implementations§
impl Freeze for ResourceDefinition
impl !RefUnwindSafe for ResourceDefinition
impl Send for ResourceDefinition
impl Sync for ResourceDefinition
impl Unpin for ResourceDefinition
impl UnsafeUnpin for ResourceDefinition
impl !UnwindSafe for ResourceDefinition
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