pub struct CratesDocsServer { /* private fields */ }Expand description
MCP server
Implementations§
Source§impl CratesDocsServer
impl CratesDocsServer
Sourcepub fn new(config: AppConfig) -> Result<Self>
pub fn new(config: AppConfig) -> Result<Self>
Create a new server instance (synchronous)
Note: This method only supports memory cache. For Redis, use the new_async method.
Sourcepub async fn new_async(config: AppConfig) -> Result<Self>
pub async fn new_async(config: AppConfig) -> Result<Self>
Create a new server instance (asynchronous)
Supports memory cache and Redis cache (requires cache-redis feature).
Sourcepub fn tool_registry(&self) -> &Arc<ToolRegistry>
pub fn tool_registry(&self) -> &Arc<ToolRegistry>
Get tool registry
Sourcepub fn server_info(&self) -> InitializeResult
pub fn server_info(&self) -> InitializeResult
Get server information
Trait Implementations§
Source§impl Clone for CratesDocsServer
impl Clone for CratesDocsServer
Source§fn clone(&self) -> CratesDocsServer
fn clone(&self) -> CratesDocsServer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CratesDocsServer
impl !RefUnwindSafe for CratesDocsServer
impl Send for CratesDocsServer
impl Sync for CratesDocsServer
impl Unpin for CratesDocsServer
impl UnsafeUnpin for CratesDocsServer
impl !UnwindSafe for CratesDocsServer
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