chore: consolidate repeated rmcp tests (#931)
This commit is contained in:
parent
4b9bea7e7d
commit
e1af378949
1 changed files with 306 additions and 332 deletions
|
|
@ -11,20 +11,20 @@ use rmcp::{
|
|||
};
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct TestHandler<T: 'static = ()> {
|
||||
pub _marker: std::marker::PhantomData<fn(*const T)>,
|
||||
struct TestHandler<T: 'static = ()> {
|
||||
_marker: std::marker::PhantomData<fn(*const T)>,
|
||||
}
|
||||
|
||||
impl<T: 'static> ServerHandler for TestHandler<T> {}
|
||||
#[derive(Debug, schemars::JsonSchema, serde::Deserialize, serde::Serialize)]
|
||||
pub struct Request {
|
||||
pub fields: HashMap<String, String>,
|
||||
struct Request {
|
||||
fields: HashMap<String, String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, schemars::JsonSchema, serde::Deserialize, serde::Serialize)]
|
||||
pub struct Sum {
|
||||
pub a: i32,
|
||||
pub b: i32,
|
||||
struct Sum {
|
||||
a: i32,
|
||||
b: i32,
|
||||
}
|
||||
|
||||
#[rmcp::tool_router(router = test_router_1)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue