2017-12-06 20:00:39 +01:00
|
|
|
//! Actix web is a small, fast, down-to-earth, open source rust web framework.
|
2017-10-07 06:48:14 +02:00
|
|
|
|
2017-11-24 19:28:43 +01:00
|
|
|
#![cfg_attr(actix_nightly, feature(
|
2017-11-24 19:03:13 +01:00
|
|
|
specialization, // for impl ErrorResponse for std::error::Error
|
|
|
|
))]
|
|
|
|
|
2017-10-07 06:48:14 +02:00
|
|
|
#[macro_use]
|
|
|
|
extern crate log;
|
|
|
|
extern crate time;
|
|
|
|
extern crate bytes;
|
2017-10-08 06:48:00 +02:00
|
|
|
extern crate sha1;
|
2017-10-17 04:21:24 +02:00
|
|
|
extern crate regex;
|
2017-10-07 06:48:14 +02:00
|
|
|
#[macro_use]
|
2017-12-08 06:52:46 +01:00
|
|
|
extern crate bitflags;
|
|
|
|
#[macro_use]
|
2017-10-07 06:48:14 +02:00
|
|
|
extern crate futures;
|
|
|
|
extern crate tokio_io;
|
2017-10-29 14:05:31 +01:00
|
|
|
extern crate tokio_core;
|
2017-10-08 23:56:51 +02:00
|
|
|
|
2017-11-16 07:06:28 +01:00
|
|
|
extern crate failure;
|
|
|
|
#[macro_use] extern crate failure_derive;
|
|
|
|
|
2017-10-15 07:52:38 +02:00
|
|
|
extern crate cookie;
|
2017-10-07 06:48:14 +02:00
|
|
|
extern crate http;
|
|
|
|
extern crate httparse;
|
2017-10-15 07:52:38 +02:00
|
|
|
extern crate http_range;
|
2017-10-19 08:43:50 +02:00
|
|
|
extern crate mime;
|
2017-10-16 10:19:23 +02:00
|
|
|
extern crate mime_guess;
|
2017-10-15 07:52:38 +02:00
|
|
|
extern crate url;
|
2017-11-10 22:26:12 +01:00
|
|
|
extern crate libc;
|
2017-11-16 07:06:28 +01:00
|
|
|
extern crate serde;
|
|
|
|
extern crate serde_json;
|
2017-11-06 10:24:49 +01:00
|
|
|
extern crate flate2;
|
|
|
|
extern crate brotli2;
|
2017-10-28 07:19:00 +02:00
|
|
|
extern crate percent_encoding;
|
2017-12-08 01:22:26 +01:00
|
|
|
extern crate smallvec;
|
2017-12-13 02:21:00 +01:00
|
|
|
extern crate num_cpus;
|
|
|
|
extern crate socket2;
|
2017-10-07 06:48:14 +02:00
|
|
|
extern crate actix;
|
2017-11-03 19:29:44 +01:00
|
|
|
extern crate h2 as http2;
|
2017-10-07 06:48:14 +02:00
|
|
|
|
2017-12-04 03:51:52 +01:00
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_use] extern crate serde_derive;
|
2017-11-16 07:06:28 +01:00
|
|
|
|
2017-11-02 00:34:58 +01:00
|
|
|
#[cfg(feature="tls")]
|
|
|
|
extern crate native_tls;
|
|
|
|
#[cfg(feature="tls")]
|
|
|
|
extern crate tokio_tls;
|
|
|
|
|
2017-11-04 20:33:14 +01:00
|
|
|
#[cfg(feature="openssl")]
|
|
|
|
extern crate openssl;
|
|
|
|
#[cfg(feature="openssl")]
|
|
|
|
extern crate tokio_openssl;
|
|
|
|
|
2017-10-07 06:48:14 +02:00
|
|
|
mod application;
|
2017-10-24 08:25:32 +02:00
|
|
|
mod body;
|
2017-10-07 06:48:14 +02:00
|
|
|
mod context;
|
|
|
|
mod date;
|
2017-11-07 01:23:58 +01:00
|
|
|
mod encoding;
|
2017-10-15 07:52:38 +02:00
|
|
|
mod httprequest;
|
2017-10-15 18:33:17 +02:00
|
|
|
mod httpresponse;
|
2017-10-09 05:16:48 +02:00
|
|
|
mod payload;
|
2017-12-06 02:09:15 +01:00
|
|
|
mod info;
|
2017-12-05 01:09:22 +01:00
|
|
|
mod route;
|
2017-12-07 01:26:27 +01:00
|
|
|
mod router;
|
2017-12-08 01:22:26 +01:00
|
|
|
mod param;
|
2017-10-07 06:48:14 +02:00
|
|
|
mod resource;
|
2017-12-04 23:53:40 +01:00
|
|
|
mod handler;
|
2017-11-25 07:15:52 +01:00
|
|
|
mod pipeline;
|
2017-10-07 06:48:14 +02:00
|
|
|
mod server;
|
2017-11-04 20:33:14 +01:00
|
|
|
mod channel;
|
2017-10-08 06:48:00 +02:00
|
|
|
mod wsframe;
|
|
|
|
mod wsproto;
|
2017-11-02 20:54:09 +01:00
|
|
|
mod h1;
|
|
|
|
mod h2;
|
2017-11-03 19:29:44 +01:00
|
|
|
mod h1writer;
|
2017-11-04 17:07:44 +01:00
|
|
|
mod h2writer;
|
2017-10-08 06:48:00 +02:00
|
|
|
|
2017-12-03 23:22:04 +01:00
|
|
|
pub mod fs;
|
2017-10-10 08:07:32 +02:00
|
|
|
pub mod ws;
|
2017-11-16 07:06:28 +01:00
|
|
|
pub mod error;
|
2017-10-07 06:48:14 +02:00
|
|
|
pub mod httpcodes;
|
2017-10-19 08:43:50 +02:00
|
|
|
pub mod multipart;
|
2017-11-10 07:08:54 +01:00
|
|
|
pub mod middlewares;
|
2017-12-04 22:32:05 +01:00
|
|
|
pub mod pred;
|
2017-12-09 00:25:37 +01:00
|
|
|
pub use error::{Error, Result, ResponseError};
|
2017-11-10 22:42:32 +01:00
|
|
|
pub use body::{Body, Binary};
|
2017-11-27 07:53:28 +01:00
|
|
|
pub use application::Application;
|
2017-12-08 01:40:29 +01:00
|
|
|
pub use httprequest::HttpRequest;
|
2017-11-27 07:53:28 +01:00
|
|
|
pub use httpresponse::HttpResponse;
|
2017-11-16 07:06:28 +01:00
|
|
|
pub use payload::{Payload, PayloadItem};
|
2017-12-09 20:39:13 +01:00
|
|
|
pub use handler::{Reply, FromRequest, Json, NormalizePath};
|
2017-12-05 01:09:22 +01:00
|
|
|
pub use route::Route;
|
|
|
|
pub use resource::Resource;
|
2017-10-07 06:48:14 +02:00
|
|
|
pub use server::HttpServer;
|
|
|
|
pub use context::HttpContext;
|
2017-10-14 19:40:58 +02:00
|
|
|
|
|
|
|
// re-exports
|
2017-10-29 22:51:30 +01:00
|
|
|
pub use http::{Method, StatusCode, Version};
|
2017-11-02 00:34:58 +01:00
|
|
|
|
2017-12-06 16:49:01 +01:00
|
|
|
#[doc(hidden)]
|
2017-11-02 00:34:58 +01:00
|
|
|
#[cfg(feature="tls")]
|
|
|
|
pub use native_tls::Pkcs12;
|
2017-11-04 20:33:14 +01:00
|
|
|
|
2017-12-06 16:49:01 +01:00
|
|
|
#[doc(hidden)]
|
2017-11-04 20:33:14 +01:00
|
|
|
#[cfg(feature="openssl")]
|
|
|
|
pub use openssl::pkcs12::Pkcs12;
|
2017-12-07 02:06:40 +01:00
|
|
|
|
2017-12-08 01:40:29 +01:00
|
|
|
pub mod headers {
|
|
|
|
//! Headers implementation
|
|
|
|
|
|
|
|
pub use encoding::ContentEncoding;
|
|
|
|
|
|
|
|
pub use cookie::Cookie;
|
|
|
|
pub use cookie::CookieBuilder;
|
|
|
|
pub use http_range::HttpRange;
|
|
|
|
}
|
|
|
|
|
2017-12-07 02:06:40 +01:00
|
|
|
pub mod dev {
|
|
|
|
//! The `actix-web` prelude for library developers
|
|
|
|
//!
|
|
|
|
//! The purpose of this module is to alleviate imports of many common actix traits
|
|
|
|
//! by adding a glob import to the top of actix heavy modules:
|
|
|
|
//!
|
|
|
|
//! ```
|
|
|
|
//! # #![allow(unused_imports)]
|
|
|
|
//! use actix_web::dev::*;
|
|
|
|
//! ```
|
|
|
|
|
|
|
|
pub use info::ConnectionInfo;
|
|
|
|
pub use handler::Handler;
|
2017-12-08 01:22:26 +01:00
|
|
|
pub use router::{Router, Pattern};
|
2017-12-07 02:06:40 +01:00
|
|
|
pub use pipeline::Pipeline;
|
|
|
|
pub use channel::{HttpChannel, HttpHandler, IntoHttpHandler};
|
2017-12-08 01:22:26 +01:00
|
|
|
pub use param::{FromParam, Params};
|
2017-12-08 07:54:44 +01:00
|
|
|
pub use server::ServerSettings;
|
2017-12-08 01:40:29 +01:00
|
|
|
pub use httprequest::UrlEncoded;
|
2017-12-07 02:06:40 +01:00
|
|
|
pub use httpresponse::HttpResponseBuilder;
|
|
|
|
}
|