pub fn encode_response_result<T: Body, E: ErrorType>(
header: TransactionHeader,
result: Result<T, E>,
) -> Result<Vec<u8>, Error>where
for<'a> <<T as Body>::MarkerInResultUnion as ValueTypeMarker>::Borrowed<'a>: Encode<T::MarkerInResultUnion, NoHandleResourceDialect>,
for<'a> <<E as ErrorType>::Marker as ValueTypeMarker>::Borrowed<'a>: Encode<E::Marker, NoHandleResourceDialect>,
Expand description
Encodes a FIDL transaction response for a two-way method with error syntax. Wraps the body in a result union set to ordinal 1 (Ok) or 2 (Err).