pub struct JsonRpcRequest<I> {
pub jsonrpc: String,
pub id: JsonRpcId,
pub method: String,
pub params: I,
}Fields§
§jsonrpc: String§id: JsonRpcId§method: String§params: IImplementations§
Source§impl<I> JsonRpcRequest<I>
impl<I> JsonRpcRequest<I>
pub fn new<O, E>(method: JsonRpcMethod<'_, I, O, E>, params: I) -> Self
Source§impl JsonRpcRequest<Value>
impl JsonRpcRequest<Value>
pub fn deserialize<I>(self) -> Result<JsonRpcRequest<I>, Error>where
I: DeserializeOwned,
Source§impl JsonRpcRequest<NoParams>
impl JsonRpcRequest<NoParams>
pub fn new_no_params<O, E>(method: JsonRpcMethod<'_, NoParams, O, E>) -> Self
Trait Implementations§
Source§impl<I: Clone> Clone for JsonRpcRequest<I>
impl<I: Clone> Clone for JsonRpcRequest<I>
Source§fn clone(&self) -> JsonRpcRequest<I>
fn clone(&self) -> JsonRpcRequest<I>
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<I: Debug> Debug for JsonRpcRequest<I>
impl<I: Debug> Debug for JsonRpcRequest<I>
Source§impl<'de, I> Deserialize<'de> for JsonRpcRequest<I>where
I: Deserialize<'de>,
impl<'de, I> Deserialize<'de> for JsonRpcRequest<I>where
I: 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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<I> Freeze for JsonRpcRequest<I>where
I: Freeze,
impl<I> RefUnwindSafe for JsonRpcRequest<I>where
I: RefUnwindSafe,
impl<I> Send for JsonRpcRequest<I>where
I: Send,
impl<I> Sync for JsonRpcRequest<I>where
I: Sync,
impl<I> Unpin for JsonRpcRequest<I>where
I: Unpin,
impl<I> UnwindSafe for JsonRpcRequest<I>where
I: 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