ureq_proto/
lib.rs

1//! Supporting crate for [ureq](https://crates.io/crates/ureq).
2//!
3//! This crate contains types used to implement ureq.
4//!
5//! # In scope:
6//!
7//! * First class HTTP/1.1 protocol implementation
8//! * Indication of connection states (such as when a connection must be closed)
9//! * transfer-encoding: chunked
10//! * 100-continue handling
11//!
12//! # Out of scope:
13//!
14//! * Opening/closing sockets
15//! * TLS (https)
16//! * Request routing
17//! * Body data transformations (charset, compression etc)
18//!
19//! # The http crate
20//!
21//! Based on the [http crate](https://crates.io/crates/http) - a unified HTTP API for Rust.
22
23#![forbid(unsafe_code)]
24#![warn(clippy::all)]
25#![allow(clippy::uninlined_format_args)]
26#![deny(missing_docs)]
27// I don't think elided lifetimes help in understanding the code.
28#![allow(clippy::needless_lifetimes)]
29
30#[macro_use]
31extern crate log;
32
33// Re-export the basis for this library.
34pub use http;
35
36mod error;
37pub use error::Error;
38
39mod chunk;
40mod ext;
41mod util;
42
43mod body;
44pub use body::BodyMode;
45
46#[cfg(feature = "client")]
47pub mod client;
48#[cfg(feature = "server")]
49pub mod server;
50
51mod close_reason;
52pub use close_reason::CloseReason;
53
54/// Low level HTTP parser
55///
56/// This is to bridge `httparse` crate to `http` crate.
57pub mod parser;
58
59#[doc(hidden)]
60pub use util::ArrayVec;