fix(macro): add generics marco types support (#98)

add generic marco support

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
This commit is contained in:
jokemanfire 2025-04-07 10:01:28 +08:00 • committed by GitHub
commit 36834f37d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,18 @@
use std::error::Error;
mod common;
use common::generic_service::{GenericService, MemoryDataService};
use rmcp::serve_server;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let memory_service = MemoryDataService::new("initial data");
let generic_service = GenericService::new(memory_service);
println!("start server, connect to standard input/output");
let io = (tokio::io::stdin(), tokio::io::stdout());
serve_server(generic_service, io).await?;
Ok(())
}