pub struct Request {
pub id: u64,
pub control: u8,
pub body: RequestBody,
}Fields§
§id: u64§control: u8§body: RequestBodyImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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
Source§impl Message for Request
impl Message for Request
Source§fn message_id(&self) -> u64
fn message_id(&self) -> u64
This is used to relate requests to responses. An RPC response has the same id as the request that generated it.
Source§fn control_code(&self) -> ProtosocketControlCode
fn control_code(&self) -> ProtosocketControlCode
Set the protosocket behavior of this message.
Source§fn set_message_id(&mut self, id: u64)
fn set_message_id(&mut self, id: u64)
This is used to relate requests to responses. An RPC response has the same id as the request that generated it.
When the message is sent, protosocket will set this value.
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin 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