Expand description
In-process test client (feature test-client).
TestClient talks to a Server without any I/O, but through the
full serialization path: every request is encoded to bytes, parsed by the
server exactly as a transport would, and the response is decoded from
bytes. Tests therefore exercise the real wire format.
let client = TestClient::new(server);
let tools = client.list_tools().await?;
let result = client.call_tool("add", serde_json::json!({ "a": 1, "b": 2 })).await?;Structs§
- Test
Client - A client that calls a
Serverin process.
Enums§
- Client
Error - An error returned by
TestClient.