These are chat archives for rust-lang/rust

Jan 2015
Jan 15 2015 22:09

Hi, could somebody explain what to do here?

trait HttpDelegate {
  fn doPost(url: &str, body: &str) ->HttpResult<Response>;

/// Synology client handles communication with download station application on NAS
pub struct SynologyClient {
  base_url: String,
  //http_client: Client<HttpConnector>
  http_delegate: HttpDelegate

struct HttpClientDelegate {
  http_client: Client<HttpConnector>

impl HttpDelegate for HttpClientDelegate {
  pub fn doPost(&mut self, url: &str, body: &str) -> HttpResult<Response>{
    let post =;

The compiler gives "error: explicit lifetime bound required" for http_delegate: HttpDelegate

Jan 15 2015 22:16
Basically I would like to build a wrapper around the hyper::HttpClient to provide a mock for connection-less tests.