pub struct JsonRpcResponse {
pub jsonrpc: String,
pub id: Option<Value>,
pub result: Option<Value>,
pub error: Option<JsonRpcError>,
}Expand description
JSON-RPC 2.0 response message
Represents an outgoing response to the LSP client.
Either result or error should be set, but not both.
Fields§
§jsonrpc: StringJSON-RPC version (always “2.0”)
id: Option<Value>Request identifier (matches the request’s id)
result: Option<Value>Success result (mutually exclusive with error)
error: Option<JsonRpcError>Error result (mutually exclusive with result)
Implementations§
Trait Implementations§
Source§impl Debug for JsonRpcResponse
impl Debug for JsonRpcResponse
Auto Trait Implementations§
impl Freeze for JsonRpcResponse
impl RefUnwindSafe for JsonRpcResponse
impl Send for JsonRpcResponse
impl Sync for JsonRpcResponse
impl Unpin for JsonRpcResponse
impl UnsafeUnpin for JsonRpcResponse
impl UnwindSafe for JsonRpcResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more