Skip to content

Function client::decode_response

zaun_community_protocol::client::decode_response · Function

pub fn decode_response<B>(body: &RawValue) -> Result<<B as >::Response>

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

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

The body does not match B::Response.

Full rustdoc page