Struct ez_jsonrpc_types::Request
source · pub struct Request<T = Value> {
pub method: String,
pub params: Option<RequestParameters<T>>,
pub id: Option<Id>,
}
Expand description
A JSON-RPC 2.0
request object.
Note that the "jsonrpc": "2.0"
member is transparently checked during
deserialization, and added during serialization.
Fields§
§method: String
A String containing the name of the method to be invoked. Method names that begin with the word rpc followed by a period character (U+002E or ASCII 46) are reserved for rpc-internal methods and extensions and MUST NOT be used for anything else.
params: Option<RequestParameters<T>>
A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.
id: Option<Id>
An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null and Numbers SHOULD NOT contain fractional parts
Implementations§
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Request<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Request<T>where
T: Deserialize<'de>,
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>,
source§impl<T: PartialEq> PartialEq for Request<T>
impl<T: PartialEq> PartialEq for Request<T>
impl<T: Eq> Eq for Request<T>
impl<T> StructuralPartialEq for Request<T>
Auto Trait Implementations§
impl<T> Freeze for Request<T>
impl<T> RefUnwindSafe for Request<T>where
T: RefUnwindSafe,
impl<T> Send for Request<T>where
T: Send,
impl<T> Sync for Request<T>where
T: Sync,
impl<T> Unpin for Request<T>where
T: Unpin,
impl<T> UnwindSafe for Request<T>where
T: RefUnwindSafe + 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)