pub fn decode_message<T: Body>(
header: TransactionHeader,
body: &[u8],
) -> Result<T, Error>where
<T::MarkerAtTopLevel as TypeMarker>::Owned: Decode<T::MarkerAtTopLevel, NoHandleResourceDialect>,Expand description
Decodes a FIDL transaction message body (request or response).
Assumes header and body come from decode_transaction_header.
Use this for one-way methods, events, and two-way method requests.
For two-way method responses:
- use
decode_response_strict_resultif the method is strict and has error syntax. - use
decode_response_flexible_resultif the method is flexible and has error syntax. - use
decode_response_flexibleif the method is flexible (no error syntax). - use this method otherwise.