fidl_message

Function decode_message

Source
pub fn decode_message<T: Body>(
    header: TransactionHeader,
    body: &[u8],
) -> Result<T, Error>
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_result if the method is strict and has error syntax.
  • use decode_response_flexible_result if the method is flexible and has error syntax.
  • use decode_response_flexible if the method is flexible (no error syntax).
  • use this method otherwise.