Why is short-term import from a Hyper mailbox impossible?

I am working on a very simple HTTP client in Rust built on top of hyper( GitHub , crates.io ).

When I try to replicate a file examples/client.rsto a new Cargo project using cargo build(and also using rustc src/main.rs), I get several errors caused by failed import from hyper.

Here is the top of mine main.rs:

extern crate hyper;

use hyper::client::{Client, Request, Response, DefaultTransport as HttpStream};
use hyper::header::Connection;
use hyper::{Decoder, Encoder, Next};

The rest of the file, with the exception of some comments, is identical to the file examples/client.rsfrom the repository hyper.

When compiling, I get the following errors:

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<HttpStream> 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;`.

In case this can affect this problem, here is the content of mine Cargo.toml:

name = "my_project"
version = "0.0.1"
authors = ["email@example.com"]

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

[[bin]]
name = "my_project"

, , , , , . , , Rust, .

+4
1

, 0.9.6. 0.9.6 hyper github, Cargo.toml:

[dependencies]                                     
hyper = {git = "https://github.com/hyperium/hyper"}
+5

All Articles