pub struct ResponseMessage<T> {
pub jsonrpc: String,
pub id: Option<IntegerOrString>,
pub result: Option<T>,
pub error: Option<ResponseError>,
}Expand description
A Response Message sent as a result of a request. If a request doesn’t provide a result value the receiver of a request still needs to return a response message to conform to the JSON-RPC specification. The result property of the ResponseMessage should be set to null in this case to signal a successful request.
Fields§
§jsonrpc: Stringjsonrpc version. LSP uses 2.0
id: Option<IntegerOrString>The request id.
result: Option<T>The result of a request. This member is REQUIRED on success. This member MUST NOT exist if there was an error invoking the method.
error: Option<ResponseError>The error object in case a request fails.
Trait Implementations§
Source§impl<T: Debug> Debug for ResponseMessage<T>
impl<T: Debug> Debug for ResponseMessage<T>
Source§impl<'de, T> Deserialize<'de> for ResponseMessage<T>where
T: Deserialize<'de> + Default,
impl<'de, T> Deserialize<'de> for ResponseMessage<T>where
T: Deserialize<'de> + Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for ResponseMessage<T>where
T: Freeze,
impl<T> RefUnwindSafe for ResponseMessage<T>where
T: RefUnwindSafe,
impl<T> Send for ResponseMessage<T>where
T: Send,
impl<T> Sync for ResponseMessage<T>where
T: Sync,
impl<T> Unpin for ResponseMessage<T>where
T: Unpin,
impl<T> UnwindSafe for ResponseMessage<T>where
T: UnwindSafe,
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