pub struct Response {
pub id: u64,
pub payload: ResponsePayload,
}Expand description
A response to a Request. Carries exactly one of result / error via
ResponsePayload. The wire shape stays flat ({id, result} or
{id, error}) for cross-language parity.
Fields§
§id: u64§payload: ResponsePayloadImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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>,
Parse the flat wire shape, enforcing the exactly-one invariant: a frame with both or neither of result / error is a malformed response.
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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