turul_mcp_json_rpc_server/
lib.rs1pub mod error;
14pub mod request;
15pub mod response;
16pub mod notification;
17pub mod dispatch;
18pub mod types;
19
20#[cfg(feature = "async")]
21pub mod r#async;
22
23pub use error::{JsonRpcError, JsonRpcErrorCode};
25pub use request::{JsonRpcRequest, RequestParams};
26pub use response::{JsonRpcResponse, ResponseResult};
27pub use notification::JsonRpcNotification;
28pub use types::{RequestId, JsonRpcVersion};
29
30#[cfg(feature = "async")]
31pub use r#async::{JsonRpcHandler, JsonRpcDispatcher, SessionContext};
32
33pub const JSONRPC_VERSION: &str = "2.0";
35
36pub mod error_codes {
38 pub const PARSE_ERROR: i64 = -32700;
39 pub const INVALID_REQUEST: i64 = -32600;
40 pub const METHOD_NOT_FOUND: i64 = -32601;
41 pub const INVALID_PARAMS: i64 = -32602;
42 pub const INTERNAL_ERROR: i64 = -32603;
43
44 pub const SERVER_ERROR_START: i64 = -32099;
46 pub const SERVER_ERROR_END: i64 = -32000;
47}