pub struct Request {
pub jsonrpc: String,
pub id: RequestId,
pub method: String,
pub params: Option<Value>,
}Expand description
One JSON-RPC request that expects a response. params is
optional per JSON-RPC; LSP methods that take no parameters
should send params: null (or omit). We always include it as
null to keep the wire layout uniform.
Fields§
§jsonrpc: StringProtocol version; JSONRPC_VERSION on everything we build. Not
validated on decode.
id: RequestIdCorrelates the eventual Response.
method: StringMethod name, e.g. textDocument/hover.
params: Option<Value>Method-specific parameters. The actor downcasts this with
serde_json::from_value::<lsp_types::FooParams>(...).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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 Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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