diff --git a/src/lib.rs b/src/lib.rs index 7881a66e..d9fc19f2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -140,7 +140,7 @@ pub use application::Application; pub use httpmessage::HttpMessage; pub use httprequest::HttpRequest; pub use httpresponse::HttpResponse; -pub use handler::{Either, Reply, Responder, NormalizePath, AsyncResponder, FutureResponse}; +pub use handler::{Either, Responder, NormalizePath, AsyncResponder, FutureResponse}; pub use route::Route; pub use resource::Resource; pub use context::HttpContext; @@ -185,12 +185,12 @@ pub mod dev { pub use body::BodyStream; pub use context::Drain; pub use info::ConnectionInfo; - pub use handler::Handler; + pub use handler::{Handler, Reply}; pub use with::WithHandler; pub use json::JsonBody; pub use router::{Router, Pattern}; pub use param::{FromParam, Params}; pub use extractor::HttpRequestExtractor; - pub use httpmessage::{UrlEncoded, MessageBody}; + pub use httpmessage::{UrlEncodedFut, MessageBody}; pub use httpresponse::HttpResponseBuilder; } diff --git a/src/route.rs b/src/route.rs index bacf12fc..4213c70d 100644 --- a/src/route.rs +++ b/src/route.rs @@ -163,7 +163,7 @@ impl Route { /// count: u32, /// } /// - /// /// extract path info using serde + /// /// extract path and query information using serde /// fn index(p: Path, q: Query) -> Result { /// Ok(format!("Welcome {}!", p.username)) /// } @@ -183,6 +183,7 @@ impl Route { self.h(with2(handler)) } + /// Set handler function, function has to accept three request extractors. pub fn with3(&mut self, handler: F) where F: Fn(T1, T2, T3) -> R + 'static, R: Responder + 'static, diff --git a/src/test.rs b/src/test.rs index b43f8cf0..97ddba40 100644 --- a/src/test.rs +++ b/src/test.rs @@ -267,6 +267,10 @@ impl Drop for TestServer { } } +/// An `TestServer` builder +/// +/// This type can be used to construct an instance of `TestServer` through a +/// builder-like pattern. pub struct TestServerBuilder { state: Box S + Sync + Send + 'static>, #[cfg(feature="alpn")]