pub struct Response<'a> {
pub kind: PacketType,
pub seq_no: u16,
pub status: ResponseStatus,
pub payload: &'a [u8],
}Expand description
An RPC reply from target to host.
On success (status == Ok) payload contains the postcard-serialized
return value. On error it contains a postcard-serialized error description.
Fields§
§kind: PacketTypePacket kind — always PacketType::Response on the wire.
seq_no: u16Matches the seq_no of the originating Request.
status: ResponseStatusExecution outcome.
payload: &'a [u8]Postcard-serialized return value or error payload.
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Response<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Response<'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> Freeze for Response<'a>
impl<'a> RefUnwindSafe for Response<'a>
impl<'a> Send for Response<'a>
impl<'a> Sync for Response<'a>
impl<'a> Unpin for Response<'a>
impl<'a> UnsafeUnpin for Response<'a>
impl<'a> UnwindSafe for Response<'a>
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