mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 08:22:59 +01:00
rearrange exports
This commit is contained in:
parent
9ea0781aba
commit
4b03d03404
20
src/dev.rs
20
src/dev.rs
@ -1,20 +0,0 @@
|
|||||||
//! 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::*;
|
|
||||||
//! ```
|
|
||||||
|
|
||||||
// dev specific
|
|
||||||
pub use info::ConnectionInfo;
|
|
||||||
pub use handler::Handler;
|
|
||||||
pub use router::Router;
|
|
||||||
pub use pipeline::Pipeline;
|
|
||||||
pub use channel::{HttpChannel, HttpHandler, IntoHttpHandler};
|
|
||||||
pub use recognizer::{FromParam, RouteRecognizer, Pattern, PatternElement};
|
|
||||||
|
|
||||||
pub use cookie::CookieBuilder;
|
|
||||||
pub use httpresponse::HttpResponseBuilder;
|
|
@ -6,9 +6,10 @@ use std::collections::HashMap;
|
|||||||
use bytes::BytesMut;
|
use bytes::BytesMut;
|
||||||
use futures::{Async, Future, Stream, Poll};
|
use futures::{Async, Future, Stream, Poll};
|
||||||
use url::{Url, form_urlencoded};
|
use url::{Url, form_urlencoded};
|
||||||
|
pub use http_range::HttpRange;
|
||||||
use http::{header, Uri, Method, Version, HeaderMap, Extensions};
|
use http::{header, Uri, Method, Version, HeaderMap, Extensions};
|
||||||
|
|
||||||
use {Cookie, HttpRange};
|
use Cookie;
|
||||||
use info::ConnectionInfo;
|
use info::ConnectionInfo;
|
||||||
use router::Router;
|
use router::Router;
|
||||||
use recognizer::Params;
|
use recognizer::Params;
|
||||||
|
27
src/lib.rs
27
src/lib.rs
@ -73,7 +73,6 @@ mod h2writer;
|
|||||||
|
|
||||||
pub mod fs;
|
pub mod fs;
|
||||||
pub mod ws;
|
pub mod ws;
|
||||||
pub mod dev;
|
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod httpcodes;
|
pub mod httpcodes;
|
||||||
pub mod multipart;
|
pub mod multipart;
|
||||||
@ -89,14 +88,12 @@ pub use payload::{Payload, PayloadItem};
|
|||||||
pub use handler::{Reply, Json, FromRequest};
|
pub use handler::{Reply, Json, FromRequest};
|
||||||
pub use route::Route;
|
pub use route::Route;
|
||||||
pub use resource::Resource;
|
pub use resource::Resource;
|
||||||
pub use recognizer::Params;
|
|
||||||
pub use server::HttpServer;
|
pub use server::HttpServer;
|
||||||
pub use context::HttpContext;
|
pub use context::HttpContext;
|
||||||
|
|
||||||
// re-exports
|
// re-exports
|
||||||
pub use http::{Method, StatusCode, Version};
|
pub use http::{Method, StatusCode, Version};
|
||||||
pub use cookie::Cookie;
|
pub use cookie::Cookie;
|
||||||
pub use http_range::HttpRange;
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[cfg(feature="tls")]
|
#[cfg(feature="tls")]
|
||||||
@ -105,3 +102,27 @@ pub use native_tls::Pkcs12;
|
|||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[cfg(feature="openssl")]
|
#[cfg(feature="openssl")]
|
||||||
pub use openssl::pkcs12::Pkcs12;
|
pub use openssl::pkcs12::Pkcs12;
|
||||||
|
|
||||||
|
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::*;
|
||||||
|
//! ```
|
||||||
|
|
||||||
|
// dev specific
|
||||||
|
pub use info::ConnectionInfo;
|
||||||
|
pub use handler::Handler;
|
||||||
|
pub use router::Router;
|
||||||
|
pub use pipeline::Pipeline;
|
||||||
|
pub use channel::{HttpChannel, HttpHandler, IntoHttpHandler};
|
||||||
|
pub use recognizer::{FromParam, RouteRecognizer, Params, Pattern, PatternElement};
|
||||||
|
|
||||||
|
pub use cookie::CookieBuilder;
|
||||||
|
pub use http_range::HttpRange;
|
||||||
|
pub use httpresponse::HttpResponseBuilder;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user