title: How to get tokio-io's async_read for a File handle
body: <p>I want to stream lines out of a file handle and I do not know how to satisfy the trait bound that a <code>File</code> has <code>async_read</code>:</p>
  
  <pre><code>use std::fs::File;
  use std::io::{ BufReader, BufRead };
  use tokio_core::reactor::Handle;
  use tokio_io::io::lines;
  use tokio_io::AsyncRead;
  
  struct DockerLog {
      path: String
  }
  
  impl DockerLog {
      pub fn new(path: String) -&gt; DockerLog {
          DockerLog {
              path: path
          }
      }
      pub fn read_lines(&amp;self, handle: &amp;Handle) {
          let file : File = File::open(&amp;self.path[..]).unwrap();
          let l = lines(BufReader::new(file));
  
      }
  }
  </code></pre>
  
  <p>The error:</p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0277]: the trait bound `std::fs::File: tokio_io::AsyncRead` is not satisfied
    --&gt; src/container/docker_logs.rs:20:17
     |
  20 |         let l = lines(BufReader::new(file));
     |                 ^^^^^ the trait `tokio_io::AsyncRead` is not implemented for `std::fs::File`
     |
     = note: required because of the requirements on the impl of `tokio_io::AsyncRead` for `std::io::BufReader&lt;std::fs::File&gt;`
     = note: required by `tokio_io::io::lines`
  </code></pre>
  
  <p>Looking over the <a href="https://docs.rs/tokio-io/0.1.2/tokio_io/trait.AsyncRead.html" rel="nofollow noreferrer"><code>AsyncRead</code></a>, it seems like a <code>File</code> doesn't mark that it has non-blocking reads. Do I need to downgrade the <code>File</code> to a <code>raw_fd</code> and then do something there?</p>