pub struct Request<'a, P> {
pub method: Cow<'a, str>,
pub params: P,
pub id: Option<Id<'a>>,
}
Expand description
A JSON-RPC 2.0 request.
Fields§
§method: Cow<'a, str>
The method to be invoked.
params: P
The parameters to be passed to the method.
id: Option<Id<'a>>
The identifier associated with the request.
Trait Implementations§
Source§impl<'de, 'a, P> Deserialize<'de> for Request<'a, P>where
P: Deserialize<'de>,
'de: 'a,
impl<'de, 'a, P> Deserialize<'de> for Request<'a, P>where
P: Deserialize<'de>,
'de: 'a,
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<'a, P> Freeze for Request<'a, P>where
P: Freeze,
impl<'a, P> RefUnwindSafe for Request<'a, P>where
P: RefUnwindSafe,
impl<'a, P> Send for Request<'a, P>where
P: Send,
impl<'a, P> Sync for Request<'a, P>where
P: Sync,
impl<'a, P> Unpin for Request<'a, P>where
P: Unpin,
impl<'a, P> UnwindSafe for Request<'a, P>where
P: 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