pub trait McpServerExt<Counterpart>{
// Provided method
fn from_rmcp<S>(
name: impl ToString,
new_fn: impl Fn() -> S + Send + Sync + 'static,
) -> McpServer<Counterpart, NullRun>
where S: Service<RoleServer> { ... }
}Provided Methods§
Sourcefn from_rmcp<S>(
name: impl ToString,
new_fn: impl Fn() -> S + Send + Sync + 'static,
) -> McpServer<Counterpart, NullRun>where
S: Service<RoleServer>,
fn from_rmcp<S>(
name: impl ToString,
new_fn: impl Fn() -> S + Send + Sync + 'static,
) -> McpServer<Counterpart, NullRun>where
S: Service<RoleServer>,
Create an MCP server from something that implements the McpServerConnect trait.
§See also
See McpServer::builder to construct MCP servers from Rust code.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.