pub struct MethodCall {
pub jsonrpc: Version,
pub method: String,
pub params: Option<Params>,
pub id: Id,
}
Expand description
Represents JSON-RPC 2.0 request which is a method call.
Fields§
§jsonrpc: Version
A String specifying the version of the JSON-RPC protocol.
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<Params>
A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.
id: Id
An identifier established by the Client. If it is not included it is assumed to be a notification.
Implementations§
Trait Implementations§
Source§impl Clone for MethodCall
impl Clone for MethodCall
Source§fn clone(&self) -> MethodCall
fn clone(&self) -> MethodCall
Returns a duplicate 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 MethodCall
impl Debug for MethodCall
Source§impl<'de> Deserialize<'de> for MethodCall
impl<'de> Deserialize<'de> for MethodCall
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MethodCall, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MethodCall, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MethodCall
impl Display for MethodCall
Source§impl From<MethodCall> for Call
impl From<MethodCall> for Call
Source§fn from(call: MethodCall) -> Call
fn from(call: MethodCall) -> Call
Converts to this type from the input type.
Source§impl From<MethodCall> for MethodCallRequest
impl From<MethodCall> for MethodCallRequest
Source§fn from(call: MethodCall) -> MethodCallRequest
fn from(call: MethodCall) -> MethodCallRequest
Converts to this type from the input type.
Source§impl PartialEq for MethodCall
impl PartialEq for MethodCall
Source§impl Serialize for MethodCall
impl Serialize for MethodCall
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for MethodCall
impl StructuralPartialEq for MethodCall
Auto Trait Implementations§
impl Freeze for MethodCall
impl RefUnwindSafe for MethodCall
impl Send for MethodCall
impl Sync for MethodCall
impl Unpin for MethodCall
impl UnwindSafe for MethodCall
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.