pub struct JsonrpcRequest {
pub id: RequestId,
pub method: String,
pub params: Option<JsonrpcRequestParams>,
/* private fields */
}
Expand description
A request that expects a response.
JSON schema
{
"description": "A request that expects a response.",
"type": "object",
"required": [
"id",
"jsonrpc",
"method"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"method": {
"type": "string"
},
"params": {
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
"$ref": "#/definitions/ProgressToken"
}
}
}
},
"additionalProperties": {}
}
}
}
Fields§
§id: RequestId
§method: String
§params: Option<JsonrpcRequestParams>
Implementations§
Trait Implementations§
Source§impl Clone for JsonrpcRequest
impl Clone for JsonrpcRequest
Source§fn clone(&self) -> JsonrpcRequest
fn clone(&self) -> JsonrpcRequest
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JsonrpcRequest
impl Debug for JsonrpcRequest
Source§impl<'de> Deserialize<'de> for JsonrpcRequest
impl<'de> Deserialize<'de> for JsonrpcRequest
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
Source§impl From<JsonrpcRequest> for JsonrpcBatchRequestItem
impl From<JsonrpcRequest> for JsonrpcBatchRequestItem
Source§fn from(value: JsonrpcRequest) -> Self
fn from(value: JsonrpcRequest) -> Self
Converts to this type from the input type.
Source§impl From<JsonrpcRequest> for JsonrpcMessage
impl From<JsonrpcRequest> for JsonrpcMessage
Source§fn from(value: JsonrpcRequest) -> Self
fn from(value: JsonrpcRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for JsonrpcRequest
impl RefUnwindSafe for JsonrpcRequest
impl Send for JsonrpcRequest
impl Sync for JsonrpcRequest
impl Unpin for JsonrpcRequest
impl UnwindSafe for JsonrpcRequest
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