pub fn handle_request(line: &str) -> Option<JsonRpcResponse>Expand description
Handle a single JSON-RPC request line.
§Request Processing
- Parse JSON-RPC 2.0 request from the line
- Validate
jsonrpcfield is"2.0" - Dispatch to appropriate handler based on
method - Return response or
Nonefor notifications
§Error Handling
- Parse Error (-32700): JSON is invalid or malformed
- Invalid Version (-32600):
jsonrpcfield is not"2.0" - Server Error (-32603): Handler function returns
Err - No Response: Notifications (requests without
id) are handled silently
§Returns
Some(response): For requests (withid)None: For notifications (withoutid)