1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-07-11 16:26:15 +00:00

better export naming

This commit is contained in:
Nikolay Kim 2017-11-26 22:53:28 -08:00
parent 0519056199
commit 170d3163f3
6 changed files with 18 additions and 8 deletions

View file

@ -26,6 +26,7 @@ enum HttpProtocol<T, H>
H2(h2::Http2<T, H>),
}
#[doc(hidden)]
pub struct HttpChannel<T, H>
where T: AsyncRead + AsyncWrite + 'static, H: 'static
{

View file

@ -13,4 +13,6 @@ pub use super::*;
// dev specific
pub use task::Task;
pub use pipeline::Pipeline;
pub use route::RouteFactory;
pub use recognizer::RouteRecognizer;
pub use channel::HttpChannel;

View file

@ -71,27 +71,27 @@ mod h2writer;
pub mod ws;
pub mod dev;
pub mod prelude;
pub mod error;
pub mod httpcodes;
pub mod multipart;
pub mod middlewares;
pub use encoding::ContentEncoding;
pub use body::{Body, Binary};
pub use application::{Application, ApplicationBuilder};
pub use application::Application;
pub use httprequest::{HttpRequest, UrlEncoded};
pub use httpresponse::{HttpResponse, HttpResponseBuilder};
pub use httpresponse::HttpResponse;
pub use payload::{Payload, PayloadItem};
pub use route::{Frame, Route, RouteFactory, RouteHandler, RouteResult};
pub use resource::{Reply, Resource};
pub use recognizer::{Params, RouteRecognizer};
pub use recognizer::Params;
pub use server::HttpServer;
pub use context::HttpContext;
pub use channel::HttpChannel;
pub use staticfiles::StaticFiles;
// re-exports
pub use http::{Method, StatusCode, Version};
pub use cookie::{Cookie, CookieBuilder};
pub use cookie::Cookie;
pub use http_range::HttpRange;
#[cfg(feature="tls")]

View file

@ -13,10 +13,10 @@ pub use self::session::{RequestSession, Session, SessionImpl, SessionBackend, Se
/// Middleware start result
pub enum Started {
/// Moddleware error
Err(Error),
/// Execution completed
Done,
/// Moddleware error
Err(Error),
/// New http response got generated. If middleware generates response
/// handler execution halts.
Response(HttpResponse),

8
src/prelude.rs Normal file
View file

@ -0,0 +1,8 @@
//! The `actix-web` prelude
pub use super::*;
pub use error::*;
pub use application::ApplicationBuilder;
pub use httpresponse::HttpResponseBuilder;
pub use cookie::CookieBuilder;

View file

@ -166,7 +166,6 @@ pub fn handshake<S>(req: &HttpRequest<S>) -> Result<HttpResponse, WsHandshakeErr
)
}
/// Maps `Payload` stream into stream of `ws::Message` items
pub struct WsStream {
rx: Payload,