fn encode_response<T: Serialize>( tag: &str, response_to: RequestId, payload: T, ) -> Result<Envelope, Error>