mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-23 23:51:06 +01:00
better export naming
This commit is contained in:
parent
0519056199
commit
170d3163f3
@ -26,6 +26,7 @@ enum HttpProtocol<T, H>
|
|||||||
H2(h2::Http2<T, H>),
|
H2(h2::Http2<T, H>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub struct HttpChannel<T, H>
|
pub struct HttpChannel<T, H>
|
||||||
where T: AsyncRead + AsyncWrite + 'static, H: 'static
|
where T: AsyncRead + AsyncWrite + 'static, H: 'static
|
||||||
{
|
{
|
||||||
|
@ -13,4 +13,6 @@ pub use super::*;
|
|||||||
// dev specific
|
// dev specific
|
||||||
pub use task::Task;
|
pub use task::Task;
|
||||||
pub use pipeline::Pipeline;
|
pub use pipeline::Pipeline;
|
||||||
|
pub use route::RouteFactory;
|
||||||
pub use recognizer::RouteRecognizer;
|
pub use recognizer::RouteRecognizer;
|
||||||
|
pub use channel::HttpChannel;
|
||||||
|
10
src/lib.rs
10
src/lib.rs
@ -71,27 +71,27 @@ mod h2writer;
|
|||||||
|
|
||||||
pub mod ws;
|
pub mod ws;
|
||||||
pub mod dev;
|
pub mod dev;
|
||||||
|
pub mod prelude;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod httpcodes;
|
pub mod httpcodes;
|
||||||
pub mod multipart;
|
pub mod multipart;
|
||||||
pub mod middlewares;
|
pub mod middlewares;
|
||||||
pub use encoding::ContentEncoding;
|
pub use encoding::ContentEncoding;
|
||||||
pub use body::{Body, Binary};
|
pub use body::{Body, Binary};
|
||||||
pub use application::{Application, ApplicationBuilder};
|
pub use application::Application;
|
||||||
pub use httprequest::{HttpRequest, UrlEncoded};
|
pub use httprequest::{HttpRequest, UrlEncoded};
|
||||||
pub use httpresponse::{HttpResponse, HttpResponseBuilder};
|
pub use httpresponse::HttpResponse;
|
||||||
pub use payload::{Payload, PayloadItem};
|
pub use payload::{Payload, PayloadItem};
|
||||||
pub use route::{Frame, Route, RouteFactory, RouteHandler, RouteResult};
|
pub use route::{Frame, Route, RouteFactory, RouteHandler, RouteResult};
|
||||||
pub use resource::{Reply, Resource};
|
pub use resource::{Reply, Resource};
|
||||||
pub use recognizer::{Params, RouteRecognizer};
|
pub use recognizer::Params;
|
||||||
pub use server::HttpServer;
|
pub use server::HttpServer;
|
||||||
pub use context::HttpContext;
|
pub use context::HttpContext;
|
||||||
pub use channel::HttpChannel;
|
|
||||||
pub use staticfiles::StaticFiles;
|
pub use staticfiles::StaticFiles;
|
||||||
|
|
||||||
// re-exports
|
// re-exports
|
||||||
pub use http::{Method, StatusCode, Version};
|
pub use http::{Method, StatusCode, Version};
|
||||||
pub use cookie::{Cookie, CookieBuilder};
|
pub use cookie::Cookie;
|
||||||
pub use http_range::HttpRange;
|
pub use http_range::HttpRange;
|
||||||
|
|
||||||
#[cfg(feature="tls")]
|
#[cfg(feature="tls")]
|
||||||
|
@ -13,10 +13,10 @@ pub use self::session::{RequestSession, Session, SessionImpl, SessionBackend, Se
|
|||||||
|
|
||||||
/// Middleware start result
|
/// Middleware start result
|
||||||
pub enum Started {
|
pub enum Started {
|
||||||
/// Moddleware error
|
|
||||||
Err(Error),
|
|
||||||
/// Execution completed
|
/// Execution completed
|
||||||
Done,
|
Done,
|
||||||
|
/// Moddleware error
|
||||||
|
Err(Error),
|
||||||
/// New http response got generated. If middleware generates response
|
/// New http response got generated. If middleware generates response
|
||||||
/// handler execution halts.
|
/// handler execution halts.
|
||||||
Response(HttpResponse),
|
Response(HttpResponse),
|
||||||
|
8
src/prelude.rs
Normal file
8
src/prelude.rs
Normal 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;
|
@ -166,7 +166,6 @@ pub fn handshake<S>(req: &HttpRequest<S>) -> Result<HttpResponse, WsHandshakeErr
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Maps `Payload` stream into stream of `ws::Message` items
|
/// Maps `Payload` stream into stream of `ws::Message` items
|
||||||
pub struct WsStream {
|
pub struct WsStream {
|
||||||
rx: Payload,
|
rx: Payload,
|
||||||
|
Loading…
Reference in New Issue
Block a user