Why are multiple imports from the Hyper crate failing?
<p>I'm working on a very simple HTTP client in Rust, built on top of the <code>hyper</code> (<a href="https://github.com/hyperium/hyper" rel="nofollow">GitHub</a>, <a href="https://crates.io/crates/hyper" rel="nofollow">crates.io</a>) crate.</p>

<p>When I try to replicate the <code>examples/client.rs</code> file in a new Cargo project using <code>cargo build</code> (as well as using <code>rustc src/main.rs</code>), I get multiple errors caused by failed imports from <code>hyper</code>.</p>

<p>Here's the top of my <code>main.rs</code>:</p>

<pre><code>extern crate hyper;

use hyper::client::{Client, Request, Response, DefaultTransport as HttpStream};
use hyper::header::Connection;
use hyper::{Decoder, Encoder, Next};
</code></pre>

<p>The rest of the file is, except for some comments, identical to the <code>examples/client.rs</code> file from the <code>hyper</code> repository.</p>

<p>At compile time, I get the following errors:</p>

<pre class="lang-none prettyprint-override"><code>src/main.rs:10:48: 10:78 error: unresolved import `hyper::client::DefaultTransport`. There is no `DefaultTransport` in `hyper::client` [E0432]
src/main.rs:10 use hyper::client::{Client, Request, Response, DefaultTransport as HttpStream};
                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.rs:10:48: 10:78 help: run `rustc --explain E0432` to see a detailed explanation
src/main.rs:12:13: 12:20 error: unresolved import `hyper::Decoder`. There is no `Decoder` in `hyper` [E0432]
src/main.rs:12 use hyper::{Decoder, Encoder, Next};
                           ^~~~~~~
src/main.rs:12:13: 12:20 help: run `rustc --explain E0432` to see a detailed explanation
src/main.rs:12:22: 12:29 error: unresolved import `hyper::Encoder`. There is no `Encoder` in `hyper` [E0432]
src/main.rs:12 use hyper::{Decoder, Encoder, Next};
                                    ^~~~~~~
src/main.rs:12:22: 12:29 help: run `rustc --explain E0432` to see a detailed explanation
src/main.rs:12:31: 12:35 error: unresolved import `hyper::Next`. There is no `Next` in `hyper` [E0432]
src/main.rs:12 use hyper::{Decoder, Encoder, Next};
                                             ^~~~
src/main.rs:12:31: 12:35 help: run `rustc --explain E0432` to see a detailed explanation
src/main.rs:53:6: 53:40 error: trait `hyper::client::Handler` is not in scope [E0405]
src/main.rs:53 impl hyper::client::Handler&lt;HttpStream&gt; for Dump {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.rs:53:6: 53:40 help: run `rustc --explain E0405` to see a detailed explanation
src/main.rs:53:6: 53:40 help: you can to import it into scope: `use hyper::server::Handler;`.
</code></pre>

<p>In case it may contribute to this issue, here are the contents of my <code>Cargo.toml</code>:</p>

<pre><code>name = "my_project"
version = "0.0.1"
authors = ["email@example.com"]

[dependencies]
getopts = "0.2"
hyper = "0.9.6"

[[bin]]
name = "my_project"
</code></pre>

<p>Some of the imports are actually working, so assuming the example in the repository is up to date, I really can't tell what's wrong. The source files of the crate look like they expose the involved types, but I'm very new to Rust so I may be misreading the files.</p>