pub struct ResourceManager { /* private fields */ }
Expand description
Resource manager for MCP server
Implementations§
Source§impl ResourceManager
impl ResourceManager
Sourcepub fn new(server: Arc<RwLock<CodePrismMcpServer>>) -> Self
pub fn new(server: Arc<RwLock<CodePrismMcpServer>>) -> Self
Create a new resource manager
Sourcepub async fn list_resources(
&self,
_params: ListResourcesParams,
) -> Result<ListResourcesResult>
pub async fn list_resources( &self, _params: ListResourcesParams, ) -> Result<ListResourcesResult>
List available resources
Sourcepub async fn read_resource(
&self,
params: ReadResourceParams,
) -> Result<ReadResourceResult>
pub async fn read_resource( &self, params: ReadResourceParams, ) -> Result<ReadResourceResult>
Read a specific resource
Auto Trait Implementations§
impl Freeze for ResourceManager
impl !RefUnwindSafe for ResourceManager
impl Send for ResourceManager
impl Sync for ResourceManager
impl Unpin for ResourceManager
impl !UnwindSafe for ResourceManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more