pub trait RequestResponseConverter {
    type OutboundResponse;
    type NetworkResponse;
    type ResponseMessage;

    // Required methods
    fn convert_to_network_response(
        &self,
        res_msg: &Self::OutboundResponse
    ) -> Result<Self::NetworkResponse, Error>;
    fn convert_to_response(
        &self,
        inter_msg: &Self::NetworkResponse
    ) -> Result<Self::ResponseMessage, Error>;
}

Required Associated Types§

source

type OutboundResponse

Response that is ready to be converted into NetworkResponse

source

type NetworkResponse

Response that is sent over the network

source

type ResponseMessage

Final Response Message deserialized from IntermediateResponse

Required Methods§

Implementors§

source§

impl RequestResponseConverter for PostcardCodec

§

type NetworkResponse = NetworkResponse

§

type OutboundResponse = OutboundResponse

§

type ResponseMessage = ResponseMessage