pub struct RequestResponse {
pub request_id: String,
pub data: Value,
pub original_request: Value,
}Expand description
The message delivered back to the requesting executor when a response is
supplied. Carries the original request data alongside the response, mirroring
Python’s response Message which retains original_request.
Fields§
§request_id: StringThe id of the request being answered.
data: ValueThe response payload supplied by the caller.
original_request: ValueThe original request payload.
Implementations§
Source§impl RequestResponse
impl RequestResponse
Sourcepub fn from_message(value: &Value) -> Option<Self>
pub fn from_message(value: &Value) -> Option<Self>
Attempt to interpret an incoming message value as a RequestResponse.
Trait Implementations§
Source§impl Clone for RequestResponse
impl Clone for RequestResponse
Source§fn clone(&self) -> RequestResponse
fn clone(&self) -> RequestResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RequestResponse
impl Debug for RequestResponse
Source§impl<'de> Deserialize<'de> for RequestResponse
impl<'de> Deserialize<'de> for RequestResponse
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 Freeze for RequestResponse
impl RefUnwindSafe for RequestResponse
impl Send for RequestResponse
impl Sync for RequestResponse
impl Unpin for RequestResponse
impl UnsafeUnpin for RequestResponse
impl UnwindSafe for RequestResponse
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