pub struct Request {
pub id: u32,
pub method: String,
pub params: Vec<Value>,
}
Expand description
Represents a MessagePack-RPC
request as described in the
specifications.
A request is a message that a client sends to a server when it expects a response. Sending a request is like calling a method: it includes a method name and an array of parameters. The response is like the return value.
Fields§
§id: u32
The id
is used to associate a response with a request. If a client sends a request with a
particular id
, the server should send a response with the same id
.
method: String
A string representing the method name.
params: Vec<Value>
An array of parameters to the method.
Trait Implementations§
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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