title: understanding error: trait `futures::future::Future` is not implemented for `()`
body: <p>This question is about how to read the Rust documentation and improve my understanding of Rust so as to understand how to address this specific compiler error.</p>
  
  <p>I've read the <a href="https://tokio.rs/docs" rel="noreferrer">tokio docs</a> and experimented with many of the <a href="https://github.com/tokio-rs/tokio/tree/master/tokio/examples" rel="noreferrer">examples</a>.  In writing my own code, I frequently run into compiler errors that I don't understand and often found I can fix the code, but don't understand <em>why</em> specific syntax is needed.</p>
  
  <p>I reproduced with a very simple example based on tokio's <a href="https://tokio.rs/docs/getting-started/hello-world/" rel="noreferrer">hello world</a>:</p>
  
  <pre><code>use futures::Future;
  use tokio::net::TcpStream;
  use tokio::prelude::*;
  
  fn main() {
    let addr = "127.0.0.1:6142".parse().unwrap();
  
    let client = TcpStream::connect(&amp;addr).and_then(|stream| {
        println!("created stream");
        // Process stream here.
  
        // Ok(())
    });
  
  }
  </code></pre>
  
  <p>The above code is incorrect, requiring the commented out <code>Ok()</code>.  I know that this is true, but not exactly why.  This is perhaps the other half of a prior question <a href="https://stackoverflow.com/questions/56402818/how-do-i-interpret-the-signature-of-read-until-and-what-is-asyncread-bufread-i">How do I interpret the signature of read_until and what is AsyncRead + BufRead in Tokio?</a> -- now I understand closures better, but can't quite parse the docs to understand the expected return value.</p>
  
  <p>When I attempt to compile the incorrect code above, I get the following error:</p>
  
  <pre><code>error[E0277]: the trait bound `(): futures::future::Future` is not satisfied
   --&gt; tokio-chat-client/src/main.rs:8:42
    |
  8 |   let client = TcpStream::connect(&amp;addr).and_then(|stream| {
    |                                          ^^^^^^^^ the trait `futures::future::Future` is not implemented for `()`
    |
    = note: required because of the requirements on the impl of `futures::future::IntoFuture` for `()`
  </code></pre>
  
  <p>There are two parts to my question:</p>
  
  <ol>
  <li>What is the error message trying to tell me?  </li>
  <li>How would I use the docs for <a href="https://docs.rs/futures/0.1.28/futures/future/trait.Future.html#method.and_then" rel="noreferrer">and_then</a> to understand the expected return value?</li>
  </ol>