1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-27 17:22:57 +01: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,