Files
h2/Cargo.toml
Carl Lerche c122e97127 Refactor errors (#46)
This patch does a bunch of refactoring, mostly around error types, but it also
paves the way to allow `Codec` to be used standalone.

* `Codec` (and `FramedRead` / `FramedWrite`) is broken out into a codec module.
* An h2-codec crate is created that re-exports the frame and codec modules.
* New error types are introduced in the internals:
  * `RecvError` represents errors caused by trying to receive a frame.
  * `SendError` represents errors caused by trying to send a frame.
  * `UserError` is an enum of potential errors caused by invalid usage
    by the user of the lib.
  * `ProtoError` is either a `Reason` or an `io::Error`. However it doesn't
    specify connection or stream level.
  * `h2::Error` is an opaque error type and is the only error type exposed
    by the public API (used to be `ConnectionError`).

There are misc code changes to enable this as well. The biggest is a new "sink"
API for `Codec`. It provides buffer which queues up a frame followed by flush
which writes everything that is queued. This departs from the `Sink` trait in
order to provide more accurate error values. For example, buffer can never fail
(but it will panic if `poll_ready` is not called first).
2017-09-02 11:12:50 -07:00

38 lines
840 B
TOML

[package]
name = "h2"
version = "0.1.0"
authors = ["Carl Lerche <me@carllerche.com>"]
[dependencies]
futures = "0.1"
tokio-io = "0.1.3"
tokio-timer = "0.1"
bytes = "0.4"
http = { git = "https://github.com/carllerche/http", rev = "2dd15d9" }
byteorder = "1.0"
log = "0.3.8"
fnv = "1.0.5"
slab = "0.4.0"
string = { git = "https://github.com/carllerche/string" }
[dev-dependencies]
mock-io = { git = "https://github.com/carllerche/mock-io", branch = "experiments" }
# Fuzzing
quickcheck = "0.4.1"
rand = "0.3.15"
# HPACK fixtures
hex = "0.2.0"
walkdir = "1.0.0"
serde = "1.0.0"
serde_json = "1.0.0"
# Akamai example
tokio-core = "0.1"
env_logger = "0.4.3"
io-dump = { git = "https://github.com/carllerche/io-dump" }
rustls = "0.11"
tokio-rustls = { git = "https://github.com/briansmith/tokio-rustls", tag = "b/p1" }
webpki-roots = "0.13"