pub struct Request<'a> {
pub kind: PacketType,
pub seq_no: u16,
pub cmd_id: u16,
pub args: &'a [u8],
}Expand description
An RPC call from host to target.
The args field is a postcard-serialized argument struct. Its schema is
identified by cmd_id, which encodes the function name and argument types
as a hash (computed at firmware build time).
Fields§
§kind: PacketTypePacket kind — always PacketType::Request on the wire.
seq_no: u16Monotonically increasing sequence number for matching responses to calls.
cmd_id: u16Command identifier: hash of (function name + input schema + output schema).
args: &'a [u8]Postcard-serialized argument bytes. Lifetime tied to the receive buffer.
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Request<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Request<'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 Request<'a>
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> UnsafeUnpin for Request<'a>
impl<'a> UnwindSafe for Request<'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