Skip to main content

decode_response

Function decode_response 

Source
pub fn decode_response<B: Body>(body: &RawValue) -> Result<B::Response>
Expand description

Decodes a successful response body as the response type of command B.

ⓘ
let sent = decode_response::<message::Send>(&raw)?; // message::Sent

§Errors

The body does not match B::Response.